syntax highlighting for readme file

This commit is contained in:
Dmitry Shirokov 2013-11-15 16:08:09 +11:00
parent 7bd721b1d7
commit c429ac9026
1 changed files with 12 additions and 9 deletions

View File

@ -1,5 +1,4 @@
chardet [![Build Status](https://travis-ci.org/runk/node-chardet.png)](https://travis-ci.org/runk/node-chardet) chardet [![Build Status](https://travis-ci.org/runk/node-chardet.png)](https://travis-ci.org/runk/node-chardet)
===== =====
@ -9,16 +8,20 @@ occurency analysis to determine the most probable encoding.
## Installation ## Installation
npm install chardet ```
npm i chardet
```
## Usage ## Usage
var chardet = require('chardet'); ```javascript
chardet.detect(new Buffer('hello there!')); var chardet = require('chardet');
// or chardet.detect(new Buffer('hello there!'));
chardet.detectFile('/path/to/file', function(err, encoding) {}); // or
// or chardet.detectFile('/path/to/file', function(err, encoding) {});
chardet.detectFileSync('/path/to/file'); // or
chardet.detectFileSync('/path/to/file');
```
## Supported Encodings: ## Supported Encodings: