JSPM

null-check

3.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 523435
  • Score
    100M100P100Q173169F
  • License MIT

Ensure a path doesn't contain null bytes

Package Exports

  • null-check

Readme

null-check

Ensure a path doesn't contain null bytes

Install

$ npm install null-check

Usage

import nullCheck from 'null-check';

try {
    nullCheck('unicorn.png\u0000');
} catch (error) {
    console.log(error);
    //=> 'Path must be a string without null bytes.'
}