Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

uv

1.0.7 • Public • Published

uv

Ultrafast UTF-8 data validation

Installation

npm i uv

Works with Node.js 6.0+!

Usage

uv exports a function that accepts a buffer as an argument and validate it.

const uv = require('uv');
 
const someBuffer = Buffer.from('Some UTF-8 data');
 
uv(someBuffer); // => true
 
uv(Buffer.from([255, 254, 253, 252, 251, 250])); // => false

Comparison with other UTF-8 validation packages

In most cases it is faster than other alternatives available on npm, please run the bench.js file from the github repo for a benchmark on your machine.

install

npm i uv

Downloadsweekly downloads

7

version

1.0.7

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability