isbinaryfile
Advanced tools
Comparing version 0.1.4 to 0.1.5
@@ -7,2 +7,4 @@ var fs = require('fs'); | ||
var file = bytes; | ||
if (!fs.existsSync(file)) | ||
return false; | ||
bytes = fs.readFileSync(file); | ||
@@ -57,2 +59,2 @@ size = fs.statSync(file).size; | ||
return false; | ||
} | ||
} |
{ | ||
"name": "isbinaryfile", | ||
"version" : "0.1.4", | ||
"version" : "0.1.5", | ||
"description": "Detects if a file is binary in Node.js. Similar to Perl's -B.", | ||
@@ -5,0 +5,0 @@ "main" : "./lib/panino.js", |
@@ -12,3 +12,3 @@ isBinaryFile | ||
Note: please make sure the file exists before calling this function. | ||
Note: if the file doesn't exist or it is empty, this function returns `false`. | ||
@@ -58,2 +58,2 @@ ## Installation | ||
Then go into the _tests_ directory, and type `mocha test.js`. | ||
Then go into the _tests_ directory, and type `mocha test.js`. |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
79688
92
58
0