charlike
Version:
Small, fast, simple and streaming project scaffolder for myself, but not only. Supports hundreds of template engines through the @JSTransformers API or if you want custom `render` function passed through options
20 lines (15 loc) • 330 B
JavaScript
;
module.exports = function (pth, cb) {
if (String(pth).indexOf('\u0000') !== -1) {
var err = new Error('Path must be a string without null bytes.');
err.code = 'ENOENT';
if (typeof cb !== 'function') {
throw err;
}
process.nextTick(function () {
cb(err);
});
return false;
}
return true;
}