chensenlai 10988628a0 语音房项目初始化 %!s(int64=5) %!d(string=hai) anos
..
build 10988628a0 语音房项目初始化 %!s(int64=5) %!d(string=hai) anos
node_modules 10988628a0 语音房项目初始化 %!s(int64=5) %!d(string=hai) anos
src 10988628a0 语音房项目初始化 %!s(int64=5) %!d(string=hai) anos
LICENSE 10988628a0 语音房项目初始化 %!s(int64=5) %!d(string=hai) anos
README.md 10988628a0 语音房项目初始化 %!s(int64=5) %!d(string=hai) anos
binding.gyp 10988628a0 语音房项目初始化 %!s(int64=5) %!d(string=hai) anos
fallback.js 10988628a0 语音房项目初始化 %!s(int64=5) %!d(string=hai) anos
index.js 10988628a0 语音房项目初始化 %!s(int64=5) %!d(string=hai) anos
package.json 10988628a0 语音房项目初始化 %!s(int64=5) %!d(string=hai) anos

README.md

utf-8-validate

Version npm Build Status Windows Build

WebSocket connections require extensive UTF-8 validation in order to conform 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 as 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 follows:

'use strict';

var validation = require('utf-8-validate').Validation;

The module exposes 1 function:

isValidUTF8

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

validation.isValidUTF8(buffer);

License

MIT