syntax highlighting for readme file
This commit is contained in:
parent
7bd721b1d7
commit
c429ac9026
21
README.md
21
README.md
|
@ -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:
|
||||||
|
|
||||||
|
@ -51,4 +54,4 @@ occurency analysis to determine the most probable encoding.
|
||||||
* windows-1256
|
* windows-1256
|
||||||
* KOI8-R
|
* KOI8-R
|
||||||
|
|
||||||
Currently only these encodings are supported, more will be added soon.
|
Currently only these encodings are supported, more will be added soon.
|
||||||
|
|
Loading…
Reference in New Issue