syntax highlighting for readme file
This commit is contained in:
parent
7bd721b1d7
commit
c429ac9026
|
@ -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
|
||||||
|
|
||||||
|
```javascript
|
||||||
var chardet = require('chardet');
|
var chardet = require('chardet');
|
||||||
chardet.detect(new Buffer('hello there!'));
|
chardet.detect(new Buffer('hello there!'));
|
||||||
// or
|
// or
|
||||||
chardet.detectFile('/path/to/file', function(err, encoding) {});
|
chardet.detectFile('/path/to/file', function(err, encoding) {});
|
||||||
// or
|
// or
|
||||||
chardet.detectFileSync('/path/to/file');
|
chardet.detectFileSync('/path/to/file');
|
||||||
|
```
|
||||||
|
|
||||||
## Supported Encodings:
|
## Supported Encodings:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue