null-check

3.0.0 • Public • Published

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.'
}

/null-check/

    Package Sidebar

    Install

    npm i null-check

    Weekly Downloads

    395,149

    Version

    3.0.0

    License

    MIT

    Unpacked Size

    2.34 kB

    Total Files

    4

    Last publish

    Collaborators

    • sindresorhus