Skip to content

Commit

Permalink
Vendor isBlob package for now to get rid of arrow function
Browse files Browse the repository at this point in the history
  • Loading branch information
ctimmerm committed Jun 1, 2022
1 parent 7432977 commit e1700fd
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 21 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016 Colin Timmermans
Copyright (c) Colin Timmermans

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
19 changes: 1 addition & 18 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
},
"dependencies": {
"fast-deep-equal": "^3.1.3",
"is-blob": "^2.1.0",
"is-buffer": "^2.0.5"
},
"bundlesize": [
Expand Down
28 changes: 28 additions & 0 deletions src/is_blob.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*!
* MIT License
*
* Copyright (c) Sindre Sorhus <[email protected]> (https://sindresorhus.com)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
* persons to whom the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
* WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

function isBlob(value) {
if (typeof Blob === 'undefined') {
return false;
}

return value instanceof Blob || Object.prototype.toString.call(value) === '[object Blob]';
}

module.exports = isBlob;
2 changes: 1 addition & 1 deletion src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

var isEqual = require("fast-deep-equal");
var isBuffer = require("is-buffer");
var isBlob = require("is-blob");
var isBlob = require("./is_blob");
var toString = Object.prototype.toString;

function find(array, predicate) {
Expand Down

0 comments on commit e1700fd

Please sign in to comment.