has-binary2
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -0,39 +1,57 @@ | ||
<a name="1.0.3"></a> | ||
## [1.0.3](https://github.com/darrachequesne/has-binary/compare/1.0.2...1.0.3) (2018-05-14) | ||
1.0.2 / 2017-04-27 | ||
================== | ||
* fix(*): Fix Blob detection for iOS 8/9 | ||
### Bug Fixes | ||
1.0.1 / 2017-04-05 | ||
================== | ||
* avoid use of global ([#4](https://github.com/darrachequesne/has-binary/issues/4)) ([91aa21e](https://github.com/darrachequesne/has-binary/commit/91aa21e)) | ||
* chore(*): restrict files included in npm package | ||
1.0.0 / 2017-04-05 | ||
================== | ||
* chore(*): update package name | ||
* fix(*): do not call toJSON more than once (#7) | ||
* fix(*): Ensure globals are functions before running `instanceof` checks against them. (#4) | ||
* fix(*): fix the case when toJSON() returns a Buffer (#6) | ||
* chore(*): Bump dependencies, add semistandard checkstyle and travis configuration (#5) | ||
* perf(*): Performance improvements (#3) | ||
<a name="1.0.2"></a> | ||
## [1.0.2](https://github.com/darrachequesne/has-binary/compare/1.0.1...1.0.2) (2017-04-27) | ||
0.1.7 / 2015-11-18 | ||
================== | ||
* fix toJSON [@jderuere] | ||
* fix `global.isBuffer` usage [@tonetheman] | ||
* fix tests on modern versions of node | ||
* bump mocha | ||
### Bug Fixes | ||
0.1.6 / 2015-01-24 | ||
================== | ||
* Fix Blob detection for iOS 8/9 ([2a7b25c](https://github.com/darrachequesne/has-binary/commit/2a7b25c)) | ||
* fix "undefined function" bug when iterating | ||
an object created with Object.create(null) [gunta] | ||
0.1.5 / 2014-09-04 | ||
================== | ||
* prevent browserify from bundling `Buffer` | ||
<a name="1.0.1"></a> | ||
## [1.0.1](https://github.com/darrachequesne/has-binary/compare/1.0.0...1.0.1) (2017-04-05) | ||
<a name="1.0.0"></a> | ||
# [1.0.0](https://github.com/darrachequesne/has-binary/compare/0.1.7...1.0.0) (2017-04-05) | ||
### Bug Fixes | ||
* do not call toJSON more than once ([#7](https://github.com/darrachequesne/has-binary/issues/7)) ([27165d2](https://github.com/darrachequesne/has-binary/commit/27165d2)) | ||
* Ensure globals are functions before running `instanceof` checks against them. ([#4](https://github.com/darrachequesne/has-binary/issues/4)) ([f9be9b3](https://github.com/darrachequesne/has-binary/commit/f9be9b3)) | ||
* fix the case when toJSON() returns a Buffer ([#6](https://github.com/darrachequesne/has-binary/issues/6)) ([518747d](https://github.com/darrachequesne/has-binary/commit/518747d)) | ||
### Performance Improvements | ||
* Performance improvements ([#3](https://github.com/darrachequesne/has-binary/issues/3)) ([3e88e81](https://github.com/darrachequesne/has-binary/commit/3e88e81)) | ||
<a name="0.1.7"></a> | ||
## [0.1.7](https://github.com/darrachequesne/has-binary/compare/0.1.6...0.1.7) (2015-11-19) | ||
<a name="0.1.6"></a> | ||
## [0.1.6](https://github.com/darrachequesne/has-binary/compare/0.1.5...0.1.6) (2015-01-24) | ||
<a name="0.1.5"></a> | ||
## 0.1.5 (2014-09-04) | ||
16
index.js
@@ -10,4 +10,6 @@ /* global Blob File */ | ||
var toString = Object.prototype.toString; | ||
var withNativeBlob = typeof global.Blob === 'function' || toString.call(global.Blob) === '[object BlobConstructor]'; | ||
var withNativeFile = typeof global.File === 'function' || toString.call(global.File) === '[object FileConstructor]'; | ||
var withNativeBlob = typeof Blob === 'function' || | ||
typeof Blob !== 'undefined' && toString.call(Blob) === '[object BlobConstructor]'; | ||
var withNativeFile = typeof File === 'function' || | ||
typeof File !== 'undefined' && toString.call(File) === '[object FileConstructor]'; | ||
@@ -43,7 +45,7 @@ /** | ||
if ((typeof global.Buffer === 'function' && global.Buffer.isBuffer && global.Buffer.isBuffer(obj)) || | ||
(typeof global.ArrayBuffer === 'function' && obj instanceof ArrayBuffer) || | ||
(withNativeBlob && obj instanceof Blob) || | ||
(withNativeFile && obj instanceof File) | ||
) { | ||
if ((typeof Buffer === 'function' && Buffer.isBuffer && Buffer.isBuffer(obj)) || | ||
(typeof ArrayBuffer === 'function' && obj instanceof ArrayBuffer) || | ||
(withNativeBlob && obj instanceof Blob) || | ||
(withNativeFile && obj instanceof File) | ||
) { | ||
return true; | ||
@@ -50,0 +52,0 @@ } |
{ | ||
"name": "has-binary2", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "A function that takes anything in javascript and returns true if its argument contains binary data.", | ||
@@ -5,0 +5,0 @@ "dependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5008
52