npm.io
3.0.0 • Published 5 years ago

null-check

Licence
MIT
Version
3.0.0
Deps
0
Size
2 kB
Vulns
0
Weekly
0
Stars
12

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

Keywords