0.5.1 • Published 4 years ago

iconv-lite-4typescript v0.5.1

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

Needed packages

  • npm install @types/node
  • npm install buffer
  • npm install stream

Usage

Basic API

import * as Iconv from 'iconv-lite';

// Convert from an encoded buffer js string.
str = Iconv.decode(Buffer.from([0x68, 0x65, 0x6c, 0x6c, 0x6f]), 'win1251');

// Convert from js string to an encoded buffer.
buf = Iconv.encode("Sample input string", 'win1251');

// Check if encoding is supported
Iconv.encodingExists("us-ascii")

More documentation

0.5.1

4 years ago