is-empty-file
Node module to check if a file is empty, optionally ignoring trailing whitespace.
Usage
$ npm install --save is-empty-file
var isEmpty = ; ; // Sync behaviourconsole; // true
The first argument you pass is the file name. The last one is the callback. If no callback is provided, the function will behave synchronously.
There's also an option (defaulting to false
) to ignore trailing whitespace.
var isEmpty = ; ;