@types/utf8
- Version 3.0.3
- Published
- 3.86 kB
- No dependencies
- MIT license
Install
npm i @types/utf8
yarn add @types/utf8
pnpm add @types/utf8
Overview
TypeScript definitions for utf8
Index
Variables
variable version
const version: string;
A string representing the semantic version number.
Functions
function decode
decode: (byteString: string) => string;
Decodes any given UTF-8-encoded string (byteString) as UTF-8, and returns the UTF-8-decoded version of the string. It throws an error when malformed UTF-8 is detected.
Parameter byteString
function encode
encode: (inputString: string) => string;
Encodes any given JavaScript string (string) as UTF-8, and returns the UTF-8-encoded version of the string. It throws an error if the input string contains a non-scalar value, i.e. a lone surrogate.
Parameter inputString
Package Files (1)
Dependencies (0)
No dependencies.
Dev Dependencies (0)
No dev dependencies.
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/utf8
.
- Markdown[](https://www.jsdocs.io/package/@types/utf8)
- HTML<a href="https://www.jsdocs.io/package/@types/utf8"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 2426 ms. - Missing or incorrect documentation? Open an issue for this package.