This package has been deprecated
Author message:
Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
safe-readfile 1.0.2 • Public • Published 8 years ago safe-readfile
A version of fs.readFile and fs.readFileSync that doesn't raise ENOENT
.
Returns undefined
if the file doesn't exist and ''
if the file exists and it's empty.
Usage
$ npm install safe - readfile
( ... )
$ node
> var safeReadFile = require ( ' safe-readfile ' ) . readFile
undefined
> safeReadFile ( ' nonexistent ' )
undefined
Versions Current Tags Version
Downloads (Last 7 Days) Version History Version
Downloads (Last 7 Days) Package Sidebar Install Downloads Weekly Downloads