JSPM

null-check

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 412367
  • Score
    100M100P100Q179056F
  • License MIT

Ensure a path doesn't contain null bytes

Package Exports

  • null-check

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (null-check) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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