aboutsummaryrefslogtreecommitdiffhomepage
path: root/node_modules/has-binary2
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/has-binary2')
-rw-r--r--node_modules/has-binary2/History.md39
-rw-r--r--node_modules/has-binary2/LICENSE20
-rw-r--r--node_modules/has-binary2/README.md4
-rw-r--r--node_modules/has-binary2/index.js62
-rw-r--r--node_modules/has-binary2/package.json85
5 files changed, 210 insertions, 0 deletions
diff --git a/node_modules/has-binary2/History.md b/node_modules/has-binary2/History.md
new file mode 100644
index 0000000..c5079b3
--- /dev/null
+++ b/node_modules/has-binary2/History.md
@@ -0,0 +1,39 @@
+
+1.0.2 / 2017-04-27
+==================
+
+ * fix(*): Fix Blob detection for iOS 8/9
+
+1.0.1 / 2017-04-05
+==================
+
+ * 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)
+
+0.1.7 / 2015-11-18
+==================
+
+ * fix toJSON [@jderuere]
+ * fix `global.isBuffer` usage [@tonetheman]
+ * fix tests on modern versions of node
+ * bump mocha
+
+0.1.6 / 2015-01-24
+==================
+
+ * 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`
diff --git a/node_modules/has-binary2/LICENSE b/node_modules/has-binary2/LICENSE
new file mode 100644
index 0000000..e6603cd
--- /dev/null
+++ b/node_modules/has-binary2/LICENSE
@@ -0,0 +1,20 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Kevin Roark
+
+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.
diff --git a/node_modules/has-binary2/README.md b/node_modules/has-binary2/README.md
new file mode 100644
index 0000000..76a0035
--- /dev/null
+++ b/node_modules/has-binary2/README.md
@@ -0,0 +1,4 @@
+has-binarydata.js
+=================
+
+Simple module to test if an object contains binary data
diff --git a/node_modules/has-binary2/index.js b/node_modules/has-binary2/index.js
new file mode 100644
index 0000000..c543498
--- /dev/null
+++ b/node_modules/has-binary2/index.js
@@ -0,0 +1,62 @@
+/* global Blob File */
+
+/*
+ * Module requirements.
+ */
+
+var isArray = require('isarray');
+
+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]';
+
+/**
+ * Module exports.
+ */
+
+module.exports = hasBinary;
+
+/**
+ * Checks for binary data.
+ *
+ * Supports Buffer, ArrayBuffer, Blob and File.
+ *
+ * @param {Object} anything
+ * @api public
+ */
+
+function hasBinary (obj) {
+ if (!obj || typeof obj !== 'object') {
+ return false;
+ }
+
+ if (isArray(obj)) {
+ for (var i = 0, l = obj.length; i < l; i++) {
+ if (hasBinary(obj[i])) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ 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)
+ ) {
+ return true;
+ }
+
+ // see: https://github.com/Automattic/has-binary/pull/4
+ if (obj.toJSON && typeof obj.toJSON === 'function' && arguments.length === 1) {
+ return hasBinary(obj.toJSON(), true);
+ }
+
+ for (var key in obj) {
+ if (Object.prototype.hasOwnProperty.call(obj, key) && hasBinary(obj[key])) {
+ return true;
+ }
+ }
+
+ return false;
+}
diff --git a/node_modules/has-binary2/package.json b/node_modules/has-binary2/package.json
new file mode 100644
index 0000000..7f97607
--- /dev/null
+++ b/node_modules/has-binary2/package.json
@@ -0,0 +1,85 @@
+{
+ "_args": [
+ [
+ {
+ "raw": "has-binary2@~1.0.2",
+ "scope": null,
+ "escapedName": "has-binary2",
+ "name": "has-binary2",
+ "rawSpec": "~1.0.2",
+ "spec": ">=1.0.2 <1.1.0",
+ "type": "range"
+ },
+ "/mnt/e/Yaroslav/Documents/Webs/nodejs/checkers/node_modules/engine.io-parser"
+ ]
+ ],
+ "_from": "has-binary2@>=1.0.2 <1.1.0",
+ "_id": "has-binary2@1.0.2",
+ "_inCache": true,
+ "_location": "/has-binary2",
+ "_nodeVersion": "6.9.4",
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/has-binary2-1.0.2.tgz_1493325765063_0.2403412840794772"
+ },
+ "_npmUser": {
+ "name": "darrachequesne",
+ "email": "damien.arrachequesne@gmail.com"
+ },
+ "_npmVersion": "3.10.10",
+ "_phantomChildren": {},
+ "_requested": {
+ "raw": "has-binary2@~1.0.2",
+ "scope": null,
+ "escapedName": "has-binary2",
+ "name": "has-binary2",
+ "rawSpec": "~1.0.2",
+ "spec": ">=1.0.2 <1.1.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/engine.io-parser",
+ "/socket.io-parser"
+ ],
+ "_resolved": "https://registry.npmjs.org/has-binary2/-/has-binary2-1.0.2.tgz",
+ "_shasum": "e83dba49f0b9be4d026d27365350d9f03f54be98",
+ "_shrinkwrap": null,
+ "_spec": "has-binary2@~1.0.2",
+ "_where": "/mnt/e/Yaroslav/Documents/Webs/nodejs/checkers/node_modules/engine.io-parser",
+ "author": {
+ "name": "Kevin Roark"
+ },
+ "dependencies": {
+ "isarray": "2.0.1"
+ },
+ "description": "A function that takes anything in javascript and returns true if its argument contains binary data.",
+ "devDependencies": {
+ "better-assert": "^1.0.2",
+ "mocha": "^3.2.0",
+ "semistandard": "^9.2.1"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "e83dba49f0b9be4d026d27365350d9f03f54be98",
+ "tarball": "https://registry.npmjs.org/has-binary2/-/has-binary2-1.0.2.tgz"
+ },
+ "files": [
+ "index.js"
+ ],
+ "gitHead": "02266c05a7b3edecf945343c26c1bc562f78bbd9",
+ "license": "MIT",
+ "maintainers": [
+ {
+ "name": "darrachequesne",
+ "email": "damien.arrachequesne@gmail.com"
+ }
+ ],
+ "name": "has-binary2",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "scripts": {
+ "checkstyle": "semistandard",
+ "test": "npm run checkstyle && mocha --bail"
+ },
+ "version": "1.0.2"
+}