find-charset
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

find-charset

npm npm license npm download total npm download by month

Dependency Status devDependency Status codecov.io

find charset from string data by the charset mark like "\x0aCharset: "

Install

npm install find-charset

Usage

import findCharset from "find-charset";
// or
// const findCharset = require("find-charset").default;
 
const found = findCharset(fs.readFileSync(`${__dirname}/sjis_lf.txt`), "\x0acharset: ", {
    charsetEndMark: "\x0a",
    caseInsensitive: true,
});
 
assert(found === "Shift_JIS");

License

Zlib License

Readme

Keywords

Package Sidebar

Install

npm i find-charset

Weekly Downloads

0

Version

1.0.0

License

Zlib

Unpacked Size

6.47 kB

Total Files

5

Last publish

Collaborators

  • narazaka