Skip to content

armgit / mocha

Public Imported from GitHub
0

☕️ Classic, reliable, trusted test framework for Node.js and the browser

rebuild mocha.js

Christopher Hiller33b7261bfe49
diff --git a/mocha.js b/mocha.js
index 5979b5bb..24e98d78 100644
--- a/mocha.js
+++ b/mocha.js
@@ -5,7 +5,7 @@ module.exports = process.env.COV
: require('./lib/mocha');
}).call(this,require('_process'))
-},{"./lib-cov/mocha":undefined,"./lib/mocha":14,"_process":52}],2:[function(require,module,exports){
+},{"./lib-cov/mocha":undefined,"./lib/mocha":14,"_process":51}],2:[function(require,module,exports){
/* eslint-disable no-unused-vars */
module.exports = function(type) {
return function() {};
@@ -613,7 +613,7 @@ module.exports = function(suite) {
});
};
-},{"../suite":37,"../test":38,"./common":9,"escape-string-regexp":73}],9:[function(require,module,exports){
+},{"../suite":37,"../test":38,"./common":9,"escape-string-regexp":72}],9:[function(require,module,exports){
'use strict';
/**
@@ -865,7 +865,7 @@ module.exports = function(suite) {
});
};
-},{"../suite":37,"../test":38,"./common":9,"escape-string-regexp":73}],13:[function(require,module,exports){
+},{"../suite":37,"../test":38,"./common":9,"escape-string-regexp":72}],13:[function(require,module,exports){
/**
* Module dependencies.
*/
@@ -973,7 +973,7 @@ module.exports = function(suite) {
});
};
-},{"../suite":37,"../test":38,"./common":9,"escape-string-regexp":73}],14:[function(require,module,exports){
+},{"../suite":37,"../test":38,"./common":9,"escape-string-regexp":72}],14:[function(require,module,exports){
(function (process,global,__dirname){
/*!
* mocha
@@ -1479,7 +1479,7 @@ Mocha.prototype.run = function(fn) {
};
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},"/lib")
-},{"./context":6,"./hook":7,"./interfaces":11,"./reporters":22,"./runnable":35,"./runner":36,"./suite":37,"./test":38,"./utils":39,"_process":52,"escape-string-regexp":73,"growl":74,"path":41}],15:[function(require,module,exports){
+},{"./context":6,"./hook":7,"./interfaces":11,"./reporters":22,"./runnable":35,"./runner":36,"./suite":37,"./test":38,"./utils":39,"_process":51,"escape-string-regexp":72,"growl":73,"path":41}],15:[function(require,module,exports){
/**
* Helpers.
*/
@@ -2119,7 +2119,7 @@ function sameType(a, b) {
}
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"../ms":15,"../utils":39,"_process":52,"chalk":68,"diff":72,"supports-color":41,"tty":5}],18:[function(require,module,exports){
+},{"../ms":15,"../utils":39,"_process":51,"chalk":67,"diff":71,"supports-color":41,"tty":5}],18:[function(require,module,exports){
/**
* Module dependencies.
*/
@@ -2171,13 +2171,13 @@ function Doc(runner) {
runner.on('pass', function(test) {
console.log('%s <dt>%s</dt>', indent(), utils.escape(test.title));
- var code = utils.escape(utils.clean(test.fn.toString()));
+ var code = utils.escape(utils.clean(test.body));
console.log('%s <dd><pre><code>%s</code></pre></dd>', indent(), code);
});
runner.on('fail', function(test, err) {
console.log('%s <dt class="error">%s</dt>', indent(), utils.escape(test.title));
- var code = utils.escape(utils.clean(test.fn.toString()));
+ var code = utils.escape(utils.clean(test.fn.body));
console.log('%s <dd class="error"><pre><code>%s</code></pre></dd>', indent(), code);
console.log('%s <dd class="error">%s</dd>', indent(), utils.escape(err));
});
@@ -2253,7 +2253,7 @@ function Dot(runner) {
inherits(Dot, Base);
}).call(this,require('_process'))
-},{"../utils":39,"./base":17,"_process":52}],20:[function(require,module,exports){
+},{"../utils":39,"./base":17,"_process":51}],20:[function(require,module,exports){
(function (process,__dirname){
/**
* Module dependencies.
@@ -2313,7 +2313,7 @@ function coverageClass(coveragePctg) {
}
}).call(this,require('_process'),"/lib/reporters")
-},{"./json-cov":23,"_process":52,"fs":41,"jade":41,"path":41}],21:[function(require,module,exports){
+},{"./json-cov":23,"_process":51,"fs":41,"jade":41,"path":41}],21:[function(require,module,exports){
(function (global){
/* eslint-env browser */
@@ -2517,7 +2517,7 @@ function HTML(runner) {
pre.style.display = pre.style.display === 'none' ? 'block' : 'none';
});
- var pre = fragment('<pre><code>%e</code></pre>', utils.clean(test.fn.toString()));
+ var pre = fragment('<pre><code>%e</code></pre>', utils.clean(test.body));
el.appendChild(pre);
pre.style.display = 'none';
}
@@ -2646,7 +2646,7 @@ function on(el, event, fn) {
}
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"../browser/progress":4,"../utils":39,"./base":17,"escape-string-regexp":73}],22:[function(require,module,exports){
+},{"../browser/progress":4,"../utils":39,"./base":17,"escape-string-regexp":72}],22:[function(require,module,exports){
// Alias exports to a their normalized format Mocha#reporter to prevent a need
// for dynamic (try/catch) requires, which Browserify doesn't handle.
exports.Base = exports.base = require('./base');
@@ -2822,7 +2822,7 @@ function clean(test) {
}
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"./base":17,"_process":52}],24:[function(require,module,exports){
+},{"./base":17,"_process":51}],24:[function(require,module,exports){
(function (process){
/**
* Module dependencies.
@@ -2886,7 +2886,7 @@ function clean(test) {
}
}).call(this,require('_process'))
-},{"./base":17,"_process":52}],25:[function(require,module,exports){
+},{"./base":17,"_process":51}],25:[function(require,module,exports){
(function (process){
/**
* Module dependencies.
@@ -2980,7 +2980,7 @@ function errorJSON(err) {
}
}).call(this,require('_process'))
-},{"./base":17,"_process":52}],26:[function(require,module,exports){
+},{"./base":17,"_process":51}],26:[function(require,module,exports){
(function (process){
/**
* Module dependencies.
@@ -3076,7 +3076,7 @@ function Landing(runner) {
inherits(Landing, Base);
}).call(this,require('_process'))
-},{"../utils":39,"./base":17,"_process":52}],27:[function(require,module,exports){
+},{"../utils":39,"./base":17,"_process":51}],27:[function(require,module,exports){
(function (process){
/**
* Module dependencies.
@@ -3141,7 +3141,7 @@ function List(runner) {
inherits(List, Base);
}).call(this,require('_process'))
-},{"../utils":39,"./base":17,"_process":52}],28:[function(require,module,exports){
+},{"../utils":39,"./base":17,"_process":51}],28:[function(require,module,exports){
(function (process){
/**
* Module dependencies.
@@ -3227,7 +3227,7 @@ function Markdown(runner) {
});
runner.on('pass', function(test) {
- var code = utils.clean(test.fn.toString());
+ var code = utils.clean(test.body);
buf += test.title + '.\n';
buf += '\n```js\n';
buf += code + '\n';
@@ -3242,7 +3242,7 @@ function Markdown(runner) {
}
}).call(this,require('_process'))
-},{"../utils":39,"./base":17,"_process":52}],29:[function(require,module,exports){
+},{"../utils":39,"./base":17,"_process":51}],29:[function(require,module,exports){
(function (process){
/**
* Module dependencies.
@@ -3282,7 +3282,7 @@ function Min(runner) {
inherits(Min, Base);
}).call(this,require('_process'))
-},{"../utils":39,"./base":17,"_process":52}],30:[function(require,module,exports){
+},{"../utils":39,"./base":17,"_process":51}],30:[function(require,module,exports){
(function (process){
/**
* Module dependencies.
@@ -3547,7 +3547,7 @@ function write(string) {
}
}).call(this,require('_process'))
-},{"../utils":39,"./base":17,"_process":52}],31:[function(require,module,exports){
+},{"../utils":39,"./base":17,"_process":51}],31:[function(require,module,exports){
(function (process){
/**
* Module dependencies.
@@ -3640,7 +3640,7 @@ function Progress(runner, options) {
inherits(Progress, Base);
}).call(this,require('_process'))
-},{"../utils":39,"./base":17,"_process":52}],32:[function(require,module,exports){
+},{"../utils":39,"./base":17,"_process":51}],32:[function(require,module,exports){
/**
* Module dependencies.
*/
@@ -3973,7 +3973,7 @@ function cdata(str) {
}
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"../utils":39,"./base":17,"_process":52,"fs":41,"mkdirp":75,"path":41}],35:[function(require,module,exports){
+},{"../utils":39,"./base":17,"_process":51,"fs":41,"mkdirp":74,"path":41}],35:[function(require,module,exports){
(function (global){
/**
* Module dependencies.
@@ -5232,7 +5232,7 @@ function extraGlobals() {
}
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"./pending":16,"./runnable":35,"./utils":39,"_process":52,"debug":2,"events":3}],37:[function(require,module,exports){
+},{"./pending":16,"./runnable":35,"./utils":39,"_process":51,"debug":2,"events":3}],37:[function(require,module,exports){
/**
* Module dependencies.
*/
@@ -5648,6 +5648,7 @@ function Test(title, fn) {
Runnable.call(this, title, fn);
this.pending = !fn;
this.type = 'test';
+ this.body = (fn || '').toString();
}
/**
@@ -6413,7 +6414,7 @@ exports.stackTraceFilter = function() {
};
}).call(this,require('_process'),require("buffer").Buffer)
-},{"_process":52,"buffer":43,"debug":2,"fs":41,"glob":41,"path":41,"util":67}],40:[function(require,module,exports){
+},{"_process":51,"buffer":43,"debug":2,"fs":41,"glob":41,"path":41,"util":66}],40:[function(require,module,exports){
(function (process){
var WritableStream = require('stream').Writable
var inherits = require('util').inherits
@@ -6442,25 +6443,21 @@ BrowserStdout.prototype._write = function(chunks, encoding, cb) {
}
}).call(this,require('_process'))
-},{"_process":52,"stream":64,"util":67}],41:[function(require,module,exports){
+},{"_process":51,"stream":63,"util":66}],41:[function(require,module,exports){
},{}],42:[function(require,module,exports){
arguments[4][41][0].apply(exports,arguments)
},{"dup":41}],43:[function(require,module,exports){
-(function (global){
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <[email protected]> <http://feross.org>
* @license MIT
*/
-/* eslint-disable no-proto */
-
-'use strict'
var base64 = require('base64-js')
var ieee754 = require('ieee754')
-var isArray = require('isarray')
+var isArray = require('is-array')
exports.Buffer = Buffer
exports.SlowBuffer = SlowBuffer
@@ -6496,11 +6493,7 @@ var rootParent = {}
* We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they
* get the Object implementation, which is slower but behaves correctly.
*/
-Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined
- ? global.TYPED_ARRAY_SUPPORT
- : typedArraySupport()
-
-function typedArraySupport () {
+Buffer.TYPED_ARRAY_SUPPORT = (function () {
function Bar () {}
try {
var arr = new Uint8Array(1)
@@ -6513,7 +6506,7 @@ function typedArraySupport () {
} catch (e) {
return false
}
-}
+})()
function kMaxLength () {
return Buffer.TYPED_ARRAY_SUPPORT
@@ -6540,10 +6533,8 @@ function Buffer (arg) {
return new Buffer(arg)
}
- if (!Buffer.TYPED_ARRAY_SUPPORT) {
- this.length = 0
- this.parent = undefined
- }
+ this.length = 0
+ this.parent = undefined
// Common case.
if (typeof arg === 'number') {
@@ -6671,20 +6662,10 @@ function fromJsonObject (that, object) {
return that
}
-if (Buffer.TYPED_ARRAY_SUPPORT) {
- Buffer.prototype.__proto__ = Uint8Array.prototype
- Buffer.__proto__ = Uint8Array
-} else {
- // pre-set for values that may exist in the future
- Buffer.prototype.length = undefined
- Buffer.prototype.parent = undefined
-}
-
function allocate (that, length) {
if (Buffer.TYPED_ARRAY_SUPPORT) {
// Return an augmented `Uint8Array` instance, for best performance
that = Buffer._augment(new Uint8Array(length))
- that.__proto__ = Buffer.prototype
} else {
// Fallback: Return an object instance of the Buffer class
that.length = length
@@ -6828,6 +6809,10 @@ function byteLength (string, encoding) {
}
Buffer.byteLength = byteLength
+// pre-set for values that may exist in the future
+Buffer.prototype.length = undefined
+Buffer.prototype.parent = undefined
+
function slowToString (encoding, start, end) {
var loweredCase = false
@@ -7469,7 +7454,7 @@ Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)
if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
- this[offset] = (value & 0xff)
+ this[offset] = value
return offset + 1
}
@@ -7486,7 +7471,7 @@ Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
if (Buffer.TYPED_ARRAY_SUPPORT) {
- this[offset] = (value & 0xff)
+ this[offset] = value
this[offset + 1] = (value >>> 8)
} else {
objectWriteUInt16(this, value, offset, true)
@@ -7500,7 +7485,7 @@ Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert
if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value >>> 8)
- this[offset + 1] = (value & 0xff)
+ this[offset + 1] = value
} else {
objectWriteUInt16(this, value, offset, false)
}
@@ -7522,7 +7507,7 @@ Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert
this[offset + 3] = (value >>> 24)
this[offset + 2] = (value >>> 16)
this[offset + 1] = (value >>> 8)
- this[offset] = (value & 0xff)
+ this[offset] = value
} else {
objectWriteUInt32(this, value, offset, true)
}
@@ -7537,7 +7522,7 @@ Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert
this[offset] = (value >>> 24)
this[offset + 1] = (value >>> 16)
this[offset + 2] = (value >>> 8)
- this[offset + 3] = (value & 0xff)
+ this[offset + 3] = value
} else {
objectWriteUInt32(this, value, offset, false)
}
@@ -7590,7 +7575,7 @@ Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {
if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)
if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
if (value < 0) value = 0xff + value + 1
- this[offset] = (value & 0xff)
+ this[offset] = value
return offset + 1
}
@@ -7599,7 +7584,7 @@ Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert)
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
if (Buffer.TYPED_ARRAY_SUPPORT) {
- this[offset] = (value & 0xff)
+ this[offset] = value
this[offset + 1] = (value >>> 8)
} else {
objectWriteUInt16(this, value, offset, true)
@@ -7613,7 +7598,7 @@ Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert)
if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value >>> 8)
- this[offset + 1] = (value & 0xff)
+ this[offset + 1] = value
} else {
objectWriteUInt16(this, value, offset, false)
}
@@ -7625,7 +7610,7 @@ Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert)
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
if (Buffer.TYPED_ARRAY_SUPPORT) {
- this[offset] = (value & 0xff)
+ this[offset] = value
this[offset + 1] = (value >>> 8)
this[offset + 2] = (value >>> 16)
this[offset + 3] = (value >>> 24)
@@ -7644,7 +7629,7 @@ Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert)
this[offset] = (value >>> 24)
this[offset + 1] = (value >>> 16)
this[offset + 2] = (value >>> 8)
- this[offset + 3] = (value & 0xff)
+ this[offset + 3] = value
} else {
objectWriteUInt32(this, value, offset, false)
}
@@ -7919,7 +7904,7 @@ function utf8ToBytes (string, units) {
}
// valid surrogate pair
- codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000
+ codePoint = leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00 | 0x10000
} else if (leadSurrogate) {
// valid bmp char, but last char was a lead
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
@@ -7997,8 +7982,7 @@ function blitBuffer (src, dst, offset, length) {
return i
}
-}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"base64-js":44,"ieee754":45,"isarray":46}],44:[function(require,module,exports){
+},{"base64-js":44,"ieee754":45,"is-array":46}],44:[function(require,module,exports){
var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
;(function (exports) {
@@ -8211,10 +8195,38 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
}
},{}],46:[function(require,module,exports){
-var toString = {}.toString;
-module.exports = Array.isArray || function (arr) {
- return toString.call(arr) == '[object Array]';
+/**
+ * isArray
+ */
+
+var isArray = Array.isArray;
+
+/**
+ * toString
+ */
+
+var str = Object.prototype.toString;
+
+/**
+ * Whether or not the given `val`
+ * is an array.
+ *
+ * example:
+ *
+ * isArray([]);
+ * // > true
+ * isArray(arguments);
+ * // > false
+ * isArray('');
+ * // > false
+ *
+ * @param {mixed} val
+ * @return {bool}
+ */
+
+module.exports = isArray || function (val) {
+ return !! val && '[object Array]' == str.call(val);
};
},{}],47:[function(require,module,exports){
@@ -8546,30 +8558,11 @@ if (typeof Object.create === 'function') {
}
},{}],49:[function(require,module,exports){
-/**
- * Determine if an object is Buffer
- *
- * Author: Feross Aboukhadijeh <[email protected]> <http://feross.org>
- * License: MIT
- *
- * `npm install is-buffer`
- */
-
-module.exports = function (obj) {
- return !!(obj != null &&
- (obj._isBuffer || // For Safari 5-7 (missing Object.prototype.constructor)
- (obj.constructor &&
- typeof obj.constructor.isBuffer === 'function' &&
- obj.constructor.isBuffer(obj))
- ))
-}
-
-},{}],50:[function(require,module,exports){
module.exports = Array.isArray || function (arr) {
return Object.prototype.toString.call(arr) == '[object Array]';
};
-},{}],51:[function(require,module,exports){
+},{}],50:[function(require,module,exports){
exports.endianness = function () { return 'LE' };
exports.hostname = function () {
@@ -8616,7 +8609,7 @@ exports.tmpdir = exports.tmpDir = function () {
exports.EOL = '\n';
-},{}],52:[function(require,module,exports){
+},{}],51:[function(require,module,exports){
// shim for using process in browser
var process = module.exports = {};
@@ -8709,10 +8702,10 @@ process.chdir = function (dir) {
};
process.umask = function() { return 0; };
-},{}],53:[function(require,module,exports){
+},{}],52:[function(require,module,exports){
module.exports = require("./lib/_stream_duplex.js")
-},{"./lib/_stream_duplex.js":54}],54:[function(require,module,exports){
+},{"./lib/_stream_duplex.js":53}],53:[function(require,module,exports){
(function (process){
// Copyright Joyent, Inc. and other Node contributors.
//
@@ -8805,7 +8798,7 @@ function forEach (xs, f) {
}
}).call(this,require('_process'))
-},{"./_stream_readable":56,"./_stream_writable":58,"_process":52,"core-util-is":59,"inherits":48}],55:[function(require,module,exports){
+},{"./_stream_readable":55,"./_stream_writable":57,"_process":51,"core-util-is":58,"inherits":48}],54:[function(require,module,exports){
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
@@ -8853,7 +8846,7 @@ PassThrough.prototype._transform = function(chunk, encoding, cb) {
cb(null, chunk);
};
-},{"./_stream_transform":57,"core-util-is":59,"inherits":48}],56:[function(require,module,exports){
+},{"./_stream_transform":56,"core-util-is":58,"inherits":48}],55:[function(require,module,exports){
(function (process){
// Copyright Joyent, Inc. and other Node contributors.
//
@@ -9808,7 +9801,7 @@ function indexOf (xs, x) {
}
}).call(this,require('_process'))
-},{"./_stream_duplex":54,"_process":52,"buffer":43,"core-util-is":59,"events":47,"inherits":48,"isarray":50,"stream":64,"string_decoder/":65,"util":42}],57:[function(require,module,exports){
+},{"./_stream_duplex":53,"_process":51,"buffer":43,"core-util-is":58,"events":47,"inherits":48,"isarray":49,"stream":63,"string_decoder/":64,"util":42}],56:[function(require,module,exports){
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
@@ -10019,7 +10012,7 @@ function done(stream, er) {
return stream.push(null);
}
-},{"./_stream_duplex":54,"core-util-is":59,"inherits":48}],58:[function(require,module,exports){
+},{"./_stream_duplex":53,"core-util-is":58,"inherits":48}],57:[function(require,module,exports){
(function (process){
// Copyright Joyent, Inc. and other Node contributors.
//
@@ -10500,7 +10493,7 @@ function endWritable(stream, state, cb) {
}
}).call(this,require('_process'))
-},{"./_stream_duplex":54,"_process":52,"buffer":43,"core-util-is":59,"inherits":48,"stream":64}],59:[function(require,module,exports){
+},{"./_stream_duplex":53,"_process":51,"buffer":43,"core-util-is":58,"inherits":48,"stream":63}],58:[function(require,module,exports){
(function (Buffer){
// Copyright Joyent, Inc. and other Node contributors.
//
@@ -10525,12 +10518,8 @@ function endWritable(stream, state, cb) {
// NOTE: These type checking functions intentionally don't use `instanceof`
// because it is fragile and can be easily faked with `Object.create()`.
-
-function isArray(arg) {
- if (Array.isArray) {
- return Array.isArray(arg);
- }
- return objectToString(arg) === '[object Array]';
+function isArray(ar) {
+ return Array.isArray(ar);
}
exports.isArray = isArray;
@@ -10570,7 +10559,7 @@ function isUndefined(arg) {
exports.isUndefined = isUndefined;
function isRegExp(re) {
- return objectToString(re) === '[object RegExp]';
+ return isObject(re) && objectToString(re) === '[object RegExp]';
}
exports.isRegExp = isRegExp;
@@ -10580,12 +10569,13 @@ function isObject(arg) {
exports.isObject = isObject;
function isDate(d) {
- return objectToString(d) === '[object Date]';
+ return isObject(d) && objectToString(d) === '[object Date]';
}
exports.isDate = isDate;
function isError(e) {
- return (objectToString(e) === '[object Error]' || e instanceof Error);
+ return isObject(e) &&
+ (objectToString(e) === '[object Error]' || e instanceof Error);
}
exports.isError = isError;
@@ -10604,17 +10594,19 @@ function isPrimitive(arg) {
}
exports.isPrimitive = isPrimitive;
-exports.isBuffer = Buffer.isBuffer;
+function isBuffer(arg) {
+ return Buffer.isBuffer(arg);
+}
+exports.isBuffer = isBuffer;
function objectToString(o) {
return Object.prototype.toString.call(o);
}
-
-}).call(this,{"isBuffer":require("../../../../insert-module-globals/node_modules/is-buffer/index.js")})
-},{"../../../../insert-module-globals/node_modules/is-buffer/index.js":49}],60:[function(require,module,exports){
+}).call(this,require("buffer").Buffer)
+},{"buffer":43}],59:[function(require,module,exports){
module.exports = require("./lib/_stream_passthrough.js")
-},{"./lib/_stream_passthrough.js":55}],61:[function(require,module,exports){
+},{"./lib/_stream_passthrough.js":54}],60:[function(require,module,exports){
exports = module.exports = require('./lib/_stream_readable.js');
exports.Stream = require('stream');
exports.Readable = exports;
@@ -10623,13 +10615,13 @@ exports.Duplex = require('./lib/_stream_duplex.js');
exports.Transform = require('./lib/_stream_transform.js');
exports.PassThrough = require('./lib/_stream_passthrough.js');
-},{"./lib/_stream_duplex.js":54,"./lib/_stream_passthrough.js":55,"./lib/_stream_readable.js":56,"./lib/_stream_transform.js":57,"./lib/_stream_writable.js":58,"stream":64}],62:[function(require,module,exports){
+},{"./lib/_stream_duplex.js":53,"./lib/_stream_passthrough.js":54,"./lib/_stream_readable.js":55,"./lib/_stream_transform.js":56,"./lib/_stream_writable.js":57,"stream":63}],61:[function(require,module,exports){
module.exports = require("./lib/_stream_transform.js")
-},{"./lib/_stream_transform.js":57}],63:[function(require,module,exports){
+},{"./lib/_stream_transform.js":56}],62:[function(require,module,exports){
module.exports = require("./lib/_stream_writable.js")
-},{"./lib/_stream_writable.js":58}],64:[function(require,module,exports){
+},{"./lib/_stream_writable.js":57}],63:[function(require,module,exports){
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
@@ -10758,7 +10750,7 @@ Stream.prototype.pipe = function(dest, options) {
return dest;
};
-},{"events":47,"inherits":48,"readable-stream/duplex.js":53,"readable-stream/passthrough.js":60,"readable-stream/readable.js":61,"readable-stream/transform.js":62,"readable-stream/writable.js":63}],65:[function(require,module,exports){
+},{"events":47,"inherits":48,"readable-stream/duplex.js":52,"readable-stream/passthrough.js":59,"readable-stream/readable.js":60,"readable-stream/transform.js":61,"readable-stream/writable.js":62}],64:[function(require,module,exports){
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
@@ -10981,14 +10973,14 @@ function base64DetectIncompleteChar(buffer) {
this.charLength = this.charReceived ? 3 : 0;
}
-},{"buffer":43}],66:[function(require,module,exports){
+},{"buffer":43}],65:[function(require,module,exports){
module.exports = function isBuffer(arg) {
return arg && typeof arg === 'object'
&& typeof arg.copy === 'function'
&& typeof arg.fill === 'function'
&& typeof arg.readUInt8 === 'function';
}
-},{}],67:[function(require,module,exports){
+},{}],66:[function(require,module,exports){
(function (process,global){
// Copyright Joyent, Inc. and other Node contributors.
//
@@ -11578,7 +11570,7 @@ function hasOwnProperty(obj, prop) {
}
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"./support/isBuffer":66,"_process":52,"inherits":48}],68:[function(require,module,exports){
+},{"./support/isBuffer":65,"_process":51,"inherits":48}],67:[function(require,module,exports){
'use strict';
var ansi = require('ansi-styles');
var stripAnsi = require('strip-ansi');
@@ -11643,7 +11635,7 @@ if (chalk.enabled === undefined) {
chalk.enabled = chalk.supportsColor;
}
-},{"ansi-styles":69,"has-color":70,"strip-ansi":71}],69:[function(require,module,exports){
+},{"ansi-styles":68,"has-color":69,"strip-ansi":70}],68:[function(require,module,exports){
'use strict';
var styles = module.exports;
@@ -11683,7 +11675,7 @@ Object.keys(codes).forEach(function (key) {
style.close = '\x1b[' + val[1] + 'm';
});
-},{}],70:[function(require,module,exports){
+},{}],69:[function(require,module,exports){
(function (process){
'use strict';
module.exports = (function () {
@@ -11719,13 +11711,13 @@ module.exports = (function () {
})();
}).call(this,require('_process'))
-},{"_process":52}],71:[function(require,module,exports){
+},{"_process":51}],70:[function(require,module,exports){
'use strict';
module.exports = function (str) {
return typeof str === 'string' ? str.replace(/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]/g, '') : str;
};
-},{}],72:[function(require,module,exports){
+},{}],71:[function(require,module,exports){
/* See LICENSE file for terms of use */
/*
@@ -12346,7 +12338,7 @@ module.exports = function (str) {
}
}(this));
-},{}],73:[function(require,module,exports){
+},{}],72:[function(require,module,exports){
'use strict';
var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
@@ -12359,7 +12351,7 @@ module.exports = function (str) {
return str.replace(matchOperatorsRe, '\\$&');
};
-},{}],74:[function(require,module,exports){
+},{}],73:[function(require,module,exports){
(function (process){
// Growl - Copyright TJ Holowaychuk <[email protected]> (MIT Licensed)
@@ -12597,7 +12589,7 @@ function growl(msg, options, fn) {
};
}).call(this,require('_process'))
-},{"_process":52,"child_process":41,"fs":41,"os":51,"path":41}],75:[function(require,module,exports){
+},{"_process":51,"child_process":41,"fs":41,"os":50,"path":41}],74:[function(require,module,exports){
(function (process){
var path = require('path');
var fs = require('fs');
@@ -12699,7 +12691,7 @@ mkdirP.sync = function sync (p, opts, made) {
};
}).call(this,require('_process'))
-},{"_process":52,"fs":41,"path":41}],76:[function(require,module,exports){
+},{"_process":51,"fs":41,"path":41}],75:[function(require,module,exports){
(function (process,global){
/**
* Shim process.stdout.
@@ -12864,4 +12856,4 @@ window.Mocha = Mocha;
window.mocha = mocha;
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"../":1,"_process":52,"browser-stdout":40}]},{},[76]);
+},{"../":1,"_process":51,"browser-stdout":40}]},{},[75]);