file-is-binary
Advanced tools
Comparing version 0.2.3 to 1.0.0
'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; | ||
}; | ||
{ | ||
"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._ |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
6644
25
+ Addedis-binary-buffer@^1.0.0
+ Addedis-binary-buffer@1.0.0(transitive)
+ Addedis-buffer@1.1.6(transitive)
- Removedisbinaryfile@^3.0.2
- Removedbuffer-alloc@1.2.0(transitive)
- Removedbuffer-alloc-unsafe@1.1.0(transitive)
- Removedbuffer-fill@1.0.0(transitive)
- Removedisbinaryfile@3.0.3(transitive)