WebRTC-Example/node_modules/utf-8-validate
Ian Golden 7df9450f20 Added ws node module 2015-12-03 15:03:41 -05:00
..
build Added ws node module 2015-12-03 15:03:41 -05:00
src Added ws node module 2015-12-03 15:03:41 -05:00
.npmignore Added ws node module 2015-12-03 15:03:41 -05:00
.travis.yml Added ws node module 2015-12-03 15:03:41 -05:00
README.md Added ws node module 2015-12-03 15:03:41 -05:00
binding.gyp Added ws node module 2015-12-03 15:03:41 -05:00
fallback.js Added ws node module 2015-12-03 15:03:41 -05:00
index.js Added ws node module 2015-12-03 15:03:41 -05:00
package.json Added ws node module 2015-12-03 15:03:41 -05:00

README.md

utf-8-validate

Build Status

WebSocket connections require extensive UTF-8 validation in order to confirm to the specification. This was unfortunately not possible in JavaScript, hence the need for a binary addon.

As the module consists of binary components, it should be used an optionalDependency so when installation fails, it doesn't halt the installation of your module. There are fallback files available in this repository. See fallback.js for the suggest fallback implementation if installation fails.

Installation

npm install utf-8-validate

API

In all examples we assume that you've already required the mdoule as followed:

'use strict';

var isValid = require('utf-8-validate').isValidUTF8;

The module exposes 1 function:

isValidUTF8

Validate if the passed in buffer contains valid UTF-8 chars.

bu.isValidUTF8(buffer);

License

MIT