Skip to content

Commit e1700fd

Browse files
committed
Vendor isBlob package for now to get rid of arrow function
1 parent 7432977 commit e1700fd

File tree

5 files changed

+31
-21
lines changed

5 files changed

+31
-21
lines changed

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2016 Colin Timmermans
3+
Copyright (c) Colin Timmermans
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

package-lock.json

+1-18
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@
5454
},
5555
"dependencies": {
5656
"fast-deep-equal": "^3.1.3",
57-
"is-blob": "^2.1.0",
5857
"is-buffer": "^2.0.5"
5958
},
6059
"bundlesize": [

src/is_blob.js

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*!
2+
* MIT License
3+
*
4+
* Copyright (c) Sindre Sorhus <[email protected]> (https://sindresorhus.com)
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
7+
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
8+
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
9+
* persons to whom the Software is furnished to do so, subject to the following conditions:
10+
*
11+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
12+
* Software.
13+
*
14+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
15+
* WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
16+
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
17+
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18+
*/
19+
20+
function isBlob(value) {
21+
if (typeof Blob === 'undefined') {
22+
return false;
23+
}
24+
25+
return value instanceof Blob || Object.prototype.toString.call(value) === '[object Blob]';
26+
}
27+
28+
module.exports = isBlob;

src/utils.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
var isEqual = require("fast-deep-equal");
44
var isBuffer = require("is-buffer");
5-
var isBlob = require("is-blob");
5+
var isBlob = require("./is_blob");
66
var toString = Object.prototype.toString;
77

88
function find(array, predicate) {

0 commit comments

Comments
 (0)