Socket
Socket
Sign inDemoInstall

isbinaryfile

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

isbinaryfile - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

4

index.js

@@ -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`.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc