New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

file-is-binary

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

file-is-binary - npm Package Compare versions

Comparing version 0.2.3 to 1.0.0

5

index.js
'use strict';
var isObject = require('isobject');
var isBinary = require('isbinaryfile');
var isBinary = require('is-binary-buffer');

@@ -30,6 +30,5 @@ module.exports = function(file) {

var len = file.stat ? file.stat.size : file.contents.length;
file._isBinary = isBinary.sync(file.contents, len);
file._isBinary = isBinary(file.contents);
return file._isBinary;
};

12

package.json
{
"name": "file-is-binary",
"description": "Returns true if a file is binary. Checks the actual contents, since extensions are not reliable. Basic wrapper for isbinaryfile to support vinyl files.",
"version": "0.2.3",
"version": "1.0.0",
"homepage": "https://github.com/jonschlinkert/file-is-binary",

@@ -23,9 +23,9 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)",

"dependencies": {
"isbinaryfile": "^3.0.2",
"is-binary-buffer": "^1.0.0",
"isobject": "^3.0.0"
},
"devDependencies": {
"gulp-format-md": "^0.1.11",
"mocha": "^3.2.0",
"vinyl": "^2.0.1"
"gulp-format-md": "^0.1.12",
"mocha": "^3.4.1",
"vinyl": "^2.0.2"
},

@@ -55,4 +55,2 @@ "keywords": [

"reflinks": [
"verb",
"verb-generate-readme"
],

@@ -59,0 +57,0 @@ "lint": {

@@ -1,2 +0,2 @@

# file-is-binary [![NPM version](https://img.shields.io/npm/v/file-is-binary.svg?style=flat)](https://www.npmjs.com/package/file-is-binary) [![NPM monthly downloads](https://img.shields.io/npm/dm/file-is-binary.svg?style=flat)](https://npmjs.org/package/file-is-binary) [![NPM total downloads](https://img.shields.io/npm/dt/file-is-binary.svg?style=flat)](https://npmjs.org/package/file-is-binary) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/file-is-binary.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/file-is-binary)
# file-is-binary [![NPM version](https://img.shields.io/npm/v/file-is-binary.svg?style=flat)](https://www.npmjs.com/package/file-is-binary) [![NPM monthly downloads](https://img.shields.io/npm/dm/file-is-binary.svg?style=flat)](https://npmjs.org/package/file-is-binary) [![NPM total downloads](https://img.shields.io/npm/dt/file-is-binary.svg?style=flat)](https://npmjs.org/package/file-is-binary) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/file-is-binary.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/file-is-binary)

@@ -74,2 +74,2 @@ > Returns true if a file is binary. Checks the actual contents, since extensions are not reliable. Basic wrapper for isbinaryfile to support vinyl files.

_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.3, on March 18, 2017._
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on May 19, 2017._
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