tree: 6ac7162156e4b1e7e7edc5a5038239a24b0bf71e [path history] [tgz]
  1. index.js
  2. license
  3. package.json
  4. readme.md
node_modules/null-check/readme.md

null-check Build Status

Ensure a path doesn't contain null bytes

The same check as done in all the core fs methods.

Install

$ npm install --save null-check

Usage

var nullCheck = require('null-check');

nullCheck('unicorn.png\u0000', function (err) {
	console.log(err);
	//=> { [Error: Path must be a string without null bytes.] code: 'ENOENT' }
});
//=> false

// the method is sync without a callback
nullCheck('unicorn.png');
//=> true

License

MIT © Sindre Sorhus