Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

white-space-x

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

white-space-x - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

6

index.js

@@ -42,3 +42,3 @@ /**

*
* @version 1.0.3
* @version 1.0.4
* @author Xotic750 <Xotic750@gmail.com>

@@ -63,4 +63,4 @@ * @copyright Xotic750

var defProp = require('define-property-x');
var escapeRx = require('regexp.escape');
var defProp = require('define-properties-x').defineProperty;
var escapeRx = require('regexp-escape-x');
var whiteSpaces = [

@@ -67,0 +67,0 @@ 0x0009, // Tab

@@ -43,3 +43,3 @@ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.returnExports = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){

*
* @version 1.0.3
* @version 1.0.4
* @author Xotic750 <Xotic750@gmail.com>

@@ -64,4 +64,4 @@ * @copyright Xotic750

var defProp = _dereq_('define-property-x');
var escapeRx = _dereq_('regexp.escape');
var defProp = _dereq_('define-properties-x').defineProperty;
var escapeRx = _dereq_('regexp-escape-x');
var whiteSpaces = [

@@ -191,85 +191,28 @@ 0x0009, // Tab

},{"define-property-x":3,"regexp.escape":23}],2:[function(_dereq_,module,exports){
'use strict';
var keys = _dereq_('object-keys');
var foreach = _dereq_('foreach');
var hasSymbols = typeof Symbol === 'function' && typeof Symbol() === 'symbol';
var toStr = Object.prototype.toString;
var isFunction = function (fn) {
return typeof fn === 'function' && toStr.call(fn) === '[object Function]';
};
var arePropertyDescriptorsSupported = function () {
var obj = {};
try {
Object.defineProperty(obj, 'x', { enumerable: false, value: obj });
/* eslint-disable no-unused-vars, no-restricted-syntax */
for (var _ in obj) { return false; }
/* eslint-enable no-unused-vars, no-restricted-syntax */
return obj.x === obj;
} catch (e) { /* this is IE 8. */
return false;
}
};
var supportsDescriptors = Object.defineProperty && arePropertyDescriptorsSupported();
var defineProperty = function (object, name, value, predicate) {
if (name in object && (!isFunction(predicate) || !predicate())) {
return;
}
if (supportsDescriptors) {
Object.defineProperty(object, name, {
configurable: true,
enumerable: false,
value: value,
writable: true
});
} else {
object[name] = value;
}
};
var defineProperties = function (object, map) {
var predicates = arguments.length > 2 ? arguments[2] : {};
var props = keys(map);
if (hasSymbols) {
props = props.concat(Object.getOwnPropertySymbols(map));
}
foreach(props, function (name) {
defineProperty(object, name, map[name], predicates[name]);
});
};
defineProperties.supportsDescriptors = !!supportsDescriptors;
module.exports = defineProperties;
},{"foreach":15,"object-keys":21}],3:[function(_dereq_,module,exports){
},{"define-properties-x":2,"regexp-escape-x":8}],2:[function(_dereq_,module,exports){
/**
* @file
* <a href="https://travis-ci.org/Xotic750/define-property-x"
* <a href="https://travis-ci.org/Xotic750/define-properties-x"
* title="Travis status">
* <img src="https://travis-ci.org/Xotic750/define-property-x.svg?branch=master"
* <img
* src="https://travis-ci.org/Xotic750/define-properties-x.svg?branch=master"
* alt="Travis status" height="18">
* </a>
* <a href="https://david-dm.org/Xotic750/define-property-x"
* <a href="https://david-dm.org/Xotic750/define-properties-x"
* title="Dependency status">
* <img src="https://david-dm.org/Xotic750/define-property-x.svg"
* <img src="https://david-dm.org/Xotic750/define-properties-x.svg"
* alt="Dependency status" height="18"/>
* </a>
* <a
* href="https://david-dm.org/Xotic750/define-property-x#info=devDependencies"
* href="https://david-dm.org/Xotic750/define-properties-x#info=devDependencies"
* title="devDependency status">
* <img src="https://david-dm.org/Xotic750/define-property-x/dev-status.svg"
* <img src="https://david-dm.org/Xotic750/define-properties-x/dev-status.svg"
* alt="devDependency status" height="18"/>
* </a>
* <a href="https://badge.fury.io/js/define-property-x" title="npm version">
* <img src="https://badge.fury.io/js/define-property-x.svg"
* <a href="https://badge.fury.io/js/define-properties-x" title="npm version">
* <img src="https://badge.fury.io/js/define-properties-x.svg"
* alt="npm version" height="18">
* </a>
*
* A helper for
* Based on the original work by Jordan Harband
* {@link https://www.npmjs.com/package/define-properties `define-properties`}.

@@ -294,7 +237,7 @@ *

*
* @version 1.0.8
* @version 1.0.0
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module define-property-x
* @module define-properties-x
*/

@@ -307,4 +250,4 @@

nonbsp:true, singleGroups:true, strict:true, undef:true, unused:true,
es3:true, esnext:false, plusplus:true, maxparams:4, maxdepth:1,
maxstatements:6, maxcomplexity:2 */
es3:true, esnext:false, plusplus:true, maxparams:4, maxdepth:2,
maxstatements:12, maxcomplexity:3 */

@@ -316,886 +259,771 @@ /*global module */

var defineProps = _dereq_('define-properties');
var hasSymbols = _dereq_('has-symbol-support-x');
var isFunction = _dereq_('is-function-x');
var isUndefined = _dereq_('validate.io-undefined');
var pConcat = Array.prototype.concat;
var pForEach = Array.prototype.forEach;
var $keys = Object.keys;
var $getOwnPropertySymbols = isFunction(Object.getOwnPropertySymbols) &&
Object.getOwnPropertySymbols;
var $defineProperty = isFunction(Object.defineProperty) &&
Object.defineProperty;
var supportsDescriptors = Boolean($defineProperty) && (function (unused) {
var obj = {};
try {
$defineProperty(obj, 'x', {
enumerable: false,
value: obj
});
for (unused in obj) {
/*jshint forin:false */
return false;
}
return obj.x === obj;
} catch (e) { /* this is IE 8. */
return false;
}
})();
/**
* Predicate that always returns `true` (constant).
* Method `defineProperty`.
*
* @private
* @return {boolean} Returns `true`.
* @param {Object} object The object on which to define the property.
* @param {string|Symbol} property The property name.
* @param {*} value The value of the property.
* @param {boolean} [force=false] If `true` then set property regardless.
*/
function truePredicate() {
return true;
function defineProperty(object, property, value, force) {
if (property in object && !force) {
return;
}
if (supportsDescriptors) {
$defineProperty(object, property, {
configurable: true,
enumerable: false,
value: value,
writable: true
});
} else {
object[property] = value;
}
}
/**
* Just like `define-properties` but for defining a single non-enumerable
* property. Useful in environments that do not
* support `Computed property names`. This can be done
* with `define-properties`, but this method can read a little cleaner.
* Method `defineProperties`.
*
* @see https://www.npmjs.com/package/define-properties
* @private
* @param {Object} object The object on which to define the property.
* @param {string|Symbol} property The property name.
* @param {*} value The value of the property.
* @param {boolean} [force=false] If `true` then set property regardless.
* @example
* var defineProps = require('define-properties');
* var defineProp = require('define-property-x');
* var myString = 'something';
* var obj = defineProps({
* a: 1,
* b: 2
* [Symbol.iterator]: function () {}, // This is not yet widely supported.
* [myString]: true // This is not yet widely supported.
* }, {
* a: function () { return false; },
* b: function () { return true; }
* [Symbol.iterator]: function () { return true; }, // This is not yet
* // widely supported.
* [myString]: function () { return true; } // This is not yet widely
* // supported.
* });
*
* // But you can do this.
* defineProp(obj, Symbol.iterator, function () {}, true);
* defineProp(obj, myString, function () {}, true);
* @param {Object} map The object of properties.
* @param {Object} [predicates] The object of property predicates.
*/
module.exports = function defineProperty(object, property, value, force) {
var prop = {};
var predicate = {};
prop[property] = value;
if (force === true) {
predicate[property] = truePredicate;
function defineProperties(object, map, predicates) {
var preds = isUndefined(predicates) ? {} : predicates;
var props = $keys(map);
if (hasSymbols && $getOwnPropertySymbols) {
props = pConcat.call(props, $getOwnPropertySymbols(map));
}
defineProps(object, prop, predicate);
};
pForEach.call(props, function (name) {
var predicate = preds[name];
defineProperty(
object,
name,
map[name],
isFunction(predicate) && predicate()
);
});
}
defineProperties(module.exports, {
/**
* Just like `defineProperties` but for defining a single non-enumerable
* property. Useful in environments that do not
* support `Computed property names`. This can be done
* with `defineProperties`, but this method can read a little cleaner.
*
* @function
* @param {Object} object The object on which to define the property.
* @param {string|Symbol} property The property name.
* @param {*} value The value of the property.
* @param {boolean} [force=false] If `true` then set property regardless.
* @example
* var lib = require('define-properties-x');
* var myString = 'something';
* lib.defineProperty(obj, Symbol.iterator, function () {}, true);
* lib.defineProperty(obj, myString, function () {}, true);
*/
defineProperty: defineProperty,
/**
* Define multiple non-enumerable properties at once.
* Uses `Object.defineProperty` when available; falls back to standard
* assignment in older engines. Existing properties are not overridden.
* Accepts a map of property names to a predicate that, when true,
* force-overrides.
*
* @function
* @param {Object} object The object on which to define the property.
* @param {Object} map The object of properties.
* @param {Object} [predicates] The object of property predicates.
* @example
* var lib = require('define-properties-x');
* lib.defineProperties({
* a: 1,
* b: 2
* }, {
* a: function () { return false; },
* b: function () { return true; }
* });
*/
defineProperties: defineProperties,
/**
* Boolean indicator as to whether the environments supports descriptors
* or not.
*
* @type boolean
* @example
* var lib = require('define-properties-x');
* lib.supportsDescriptors; // true or false
*/
supportsDescriptors: supportsDescriptors
});
}());
},{"define-properties":2}],4:[function(_dereq_,module,exports){
'use strict';
},{"has-symbol-support-x":3,"is-function-x":5,"validate.io-undefined":11}],3:[function(_dereq_,module,exports){
/**
* @file
* <a href="https://travis-ci.org/Xotic750/has-symbol-support-x"
* title="Travis status">
* <img
* src="https://travis-ci.org/Xotic750/has-symbol-support-x.svg?branch=master"
* alt="Travis status" height="18">
* </a>
* <a href="https://david-dm.org/Xotic750/has-symbol-support-x"
* title="Dependency status">
* <img src="https://david-dm.org/Xotic750/has-symbol-support-x.svg"
* alt="Dependency status" height="18"/>
* </a>
* <a
* href="https://david-dm.org/Xotic750/has-symbol-support-x#info=devDependencies"
* title="devDependency status">
* <img src="https://david-dm.org/Xotic750/has-symbol-support-x/dev-status.svg"
* alt="devDependency status" height="18"/>
* </a>
* <a href="https://badge.fury.io/js/has-symbol-support-x" title="npm version">
* <img src="https://badge.fury.io/js/has-symbol-support-x.svg"
* alt="npm version" height="18">
* </a>
*
* hasSymbolSupport module. Tests if `Symbol` exists and creates the correct
* type.
*
* <h2>ECMAScript compatibility shims for legacy JavaScript engines</h2>
* `es5-shim.js` monkey-patches a JavaScript context to contain all EcmaScript 5
* methods that can be faithfully emulated with a legacy JavaScript engine.
*
* `es5-sham.js` monkey-patches other ES5 methods as closely as possible.
* For these methods, as closely as possible to ES5 is not very close.
* Many of these shams are intended only to allow code to be written to ES5
* without causing run-time errors in older engines. In many cases,
* this means that these shams cause many ES5 methods to silently fail.
* Decide carefully whether this is what you want. Note: es5-sham.js requires
* es5-shim.js to be able to work properly.
*
* `json3.js` monkey-patches the EcmaScript 5 JSON implimentation faithfully.
*
* `es6.shim.js` provides compatibility shims so that legacy JavaScript engines
* behave as closely as possible to ECMAScript 6 (Harmony).
*
* @version 1.0.6
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module has-symbol-support-x
*/
var $isNaN = Number.isNaN || function (a) { return a !== a; };
var $isFinite = _dereq_('./helpers/isFinite');
/*jslint maxlen:80, es6:true, white:true */
var sign = _dereq_('./helpers/sign');
var mod = _dereq_('./helpers/mod');
/*jshint bitwise:true, camelcase:true, curly:true, eqeqeq:true, forin:true,
freeze:true, futurehostile:true, latedef:true, newcap:true, nocomma:true,
nonbsp:true, singleGroups:true, strict:true, undef:true, unused:true,
es3:false, esnext:true, plusplus:true, maxparams:1, maxdepth:1,
maxstatements:1, maxcomplexity:1 */
var IsCallable = _dereq_('is-callable');
var toPrimitive = _dereq_('es-to-primitive/es5');
/*global module */
// https://es5.github.io/#x9
var ES5 = {
ToPrimitive: toPrimitive,
;(function () {
'use strict';
ToBoolean: function ToBoolean(value) {
return Boolean(value);
},
ToNumber: function ToNumber(value) {
return Number(value);
},
ToInteger: function ToInteger(value) {
var number = this.ToNumber(value);
if ($isNaN(number)) { return 0; }
if (number === 0 || !$isFinite(number)) { return number; }
return sign(number) * Math.floor(Math.abs(number));
},
ToInt32: function ToInt32(x) {
return this.ToNumber(x) >> 0;
},
ToUint32: function ToUint32(x) {
return this.ToNumber(x) >>> 0;
},
ToUint16: function ToUint16(value) {
var number = this.ToNumber(value);
if ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; }
var posInt = sign(number) * Math.floor(Math.abs(number));
return mod(posInt, 0x10000);
},
ToString: function ToString(value) {
return String(value);
},
ToObject: function ToObject(value) {
this.CheckObjectCoercible(value);
return Object(value);
},
CheckObjectCoercible: function CheckObjectCoercible(value, optMessage) {
/* jshint eqnull:true */
if (value == null) {
throw new TypeError(optMessage || 'Cannot call method on ' + value);
}
return value;
},
IsCallable: IsCallable,
SameValue: function SameValue(x, y) {
if (x === y) { // 0 === -0, but they are not identical.
if (x === 0) { return 1 / x === 1 / y; }
return true;
}
return $isNaN(x) && $isNaN(y);
}
};
/**
* Indicates if `Symbol`exists and creates the correct type.
* `true`, if it exists and creates the correct type, otherwise `false`.
*
* @type boolean
*/
module.exports = typeof Symbol === 'function' && typeof Symbol() === 'symbol';
}());
module.exports = ES5;
},{}],4:[function(_dereq_,module,exports){
/**
* @file
* <a href="https://travis-ci.org/Xotic750/has-to-string-tag-x"
* title="Travis status">
* <img
* src="https://travis-ci.org/Xotic750/has-to-string-tag-x.svg?branch=master"
* alt="Travis status" height="18">
* </a>
* <a href="https://david-dm.org/Xotic750/has-to-string-tag-x"
* title="Dependency status">
* <img src="https://david-dm.org/Xotic750/has-to-string-tag-x.svg"
* alt="Dependency status" height="18"/>
* </a>
* <a
* href="https://david-dm.org/Xotic750/has-to-string-tag-x#info=devDependencies"
* title="devDependency status">
* <img src="https://david-dm.org/Xotic750/has-to-string-tag-x/dev-status.svg"
* alt="devDependency status" height="18"/>
* </a>
* <a href="https://badge.fury.io/js/has-to-string-tag-x" title="npm version">
* <img src="https://badge.fury.io/js/has-to-string-tag-x.svg"
* alt="npm version" height="18">
* </a>
*
* hasToStringTag tests if @@toStringTag is supported. `true` if supported.
*
* <h2>ECMAScript compatibility shims for legacy JavaScript engines</h2>
* `es5-shim.js` monkey-patches a JavaScript context to contain all EcmaScript 5
* methods that can be faithfully emulated with a legacy JavaScript engine.
*
* `es5-sham.js` monkey-patches other ES5 methods as closely as possible.
* For these methods, as closely as possible to ES5 is not very close.
* Many of these shams are intended only to allow code to be written to ES5
* without causing run-time errors in older engines. In many cases,
* this means that these shams cause many ES5 methods to silently fail.
* Decide carefully whether this is what you want. Note: es5-sham.js requires
* es5-shim.js to be able to work properly.
*
* `json3.js` monkey-patches the EcmaScript 5 JSON implimentation faithfully.
*
* `es6.shim.js` provides compatibility shims so that legacy JavaScript engines
* behave as closely as possible to ECMAScript 6 (Harmony).
*
* @version 1.0.5
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module has-to-string-tag-x
*/
},{"./helpers/isFinite":8,"./helpers/mod":10,"./helpers/sign":11,"es-to-primitive/es5":12,"is-callable":17}],5:[function(_dereq_,module,exports){
'use strict';
/*jslint maxlen:80, es6:true, white:true */
var toStr = Object.prototype.toString;
var hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol';
var symbolToStr = hasSymbols ? Symbol.prototype.toString : toStr;
/*jshint bitwise:true, camelcase:true, curly:true, eqeqeq:true, forin:true,
freeze:true, futurehostile:true, latedef:true, newcap:true, nocomma:true,
nonbsp:true, singleGroups:true, strict:true, undef:true, unused:true,
es3:false, esnext:true, plusplus:true, maxparams:1, maxdepth:1,
maxstatements:1, maxcomplexity:1 */
var $isNaN = Number.isNaN || function (a) { return a !== a; };
var $isFinite = _dereq_('./helpers/isFinite');
var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || Math.pow(2, 53) - 1;
/*global module */
var assign = _dereq_('./helpers/assign');
var sign = _dereq_('./helpers/sign');
var mod = _dereq_('./helpers/mod');
var isPrimitive = _dereq_('./helpers/isPrimitive');
var toPrimitive = _dereq_('es-to-primitive/es6');
var parseInteger = parseInt;
var bind = _dereq_('function-bind');
var strSlice = bind.call(Function.call, String.prototype.slice);
var isBinary = bind.call(Function.call, RegExp.prototype.test, /^0b[01]+$/i);
var isOctal = bind.call(Function.call, RegExp.prototype.test, /^0o[0-7]+$/i);
var nonWS = ['\u0085', '\u200b', '\ufffe'].join('');
var nonWSregex = new RegExp('[' + nonWS + ']', 'g');
var hasNonWS = bind.call(Function.call, RegExp.prototype.test, nonWSregex);
var invalidHexLiteral = /^[\-\+]0x[0-9a-f]+$/i;
var isInvalidHexLiteral = bind.call(Function.call, RegExp.prototype.test, invalidHexLiteral);
;(function () {
'use strict';
// whitespace from: http://es5.github.io/#x15.5.4.20
// implementation from https://github.com/es-shims/es5-shim/blob/v3.4.0/es5-shim.js#L1304-L1324
var ws = [
'\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003',
'\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028',
'\u2029\uFEFF'
].join('');
var trimRegex = new RegExp('(^[' + ws + ']+)|([' + ws + ']+$)', 'g');
var replace = bind.call(Function.call, String.prototype.replace);
var trim = function (value) {
return replace(value, trimRegex, '');
};
/**
* Indicates if `Symbol.toStringTag`exists and is the correct type.
* `true`, if it exists and is the correct type, otherwise `false`.
*
* @type boolean
*/
module.exports = _dereq_('has-symbol-support-x') &&
typeof Symbol.toStringTag === 'symbol';
}());
var ES5 = _dereq_('./es5');
},{"has-symbol-support-x":3}],5:[function(_dereq_,module,exports){
/**
* @file
* <a href="https://travis-ci.org/Xotic750/is-function-x"
* title="Travis status">
* <img
* src="https://travis-ci.org/Xotic750/is-function-x.svg?branch=master"
* alt="Travis status" height="18">
* </a>
* <a href="https://david-dm.org/Xotic750/is-function-x"
* title="Dependency status">
* <img src="https://david-dm.org/Xotic750/is-function-x.svg"
* alt="Dependency status" height="18"/>
* </a>
* <a
* href="https://david-dm.org/Xotic750/is-function-x#info=devDependencies"
* title="devDependency status">
* <img src="https://david-dm.org/Xotic750/is-function-x/dev-status.svg"
* alt="devDependency status" height="18"/>
* </a>
* <a href="https://badge.fury.io/js/is-function-x" title="npm version">
* <img src="https://badge.fury.io/js/is-function-x.svg"
* alt="npm version" height="18">
* </a>
*
* isFunction module. Determine whether a given value is a function object.
*
* <h2>ECMAScript compatibility shims for legacy JavaScript engines</h2>
* `es5-shim.js` monkey-patches a JavaScript context to contain all EcmaScript 5
* methods that can be faithfully emulated with a legacy JavaScript engine.
*
* `es5-sham.js` monkey-patches other ES5 methods as closely as possible.
* For these methods, as closely as possible to ES5 is not very close.
* Many of these shams are intended only to allow code to be written to ES5
* without causing run-time errors in older engines. In many cases,
* this means that these shams cause many ES5 methods to silently fail.
* Decide carefully whether this is what you want. Note: es5-sham.js requires
* es5-shim.js to be able to work properly.
*
* `json3.js` monkey-patches the EcmaScript 5 JSON implimentation faithfully.
*
* `es6.shim.js` provides compatibility shims so that legacy JavaScript engines
* behave as closely as possible to ECMAScript 6 (Harmony).
*
* @version 1.0.1
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module is-function-x
*/
var hasRegExpMatcher = _dereq_('is-regex');
/*jslint maxlen:80, es6:false, white:true */
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-abstract-operations
var ES6 = assign(assign({}, ES5), {
/*jshint bitwise:true, camelcase:true, curly:true, eqeqeq:true, forin:true,
freeze:true, futurehostile:true, latedef:true, newcap:true, nocomma:true,
nonbsp:true, singleGroups:true, strict:true, undef:true, unused:true,
es3:true, esnext:false, plusplus:true, maxparams:1, maxdepth:1,
maxstatements:8, maxcomplexity:4 */
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-call-f-v-args
Call: function Call(F, V) {
var args = arguments.length > 2 ? arguments[2] : [];
if (!this.IsCallable(F)) {
throw new TypeError(F + ' is not a function');
}
return F.apply(V, args);
},
/*global module */
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-toprimitive
ToPrimitive: toPrimitive,
;(function () {
'use strict';
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-toboolean
// ToBoolean: ES5.ToBoolean,
var fToString = Function.prototype.toString;
var toStringTag = _dereq_('to-string-tag-x');
var hasToStringTag = _dereq_('has-to-string-tag-x');
var isPrimitive = _dereq_('is-primitive');
var funcTag = '[object Function]';
var genTag = '[object GeneratorFunction]';
// http://www.ecma-international.org/ecma-262/6.0/#sec-tonumber
ToNumber: function ToNumber(argument) {
var value = isPrimitive(argument) ? argument : toPrimitive(argument, 'number');
if (typeof value === 'symbol') {
throw new TypeError('Cannot convert a Symbol value to a number');
}
if (typeof value === 'string') {
if (isBinary(value)) {
return this.ToNumber(parseInteger(strSlice(value, 2), 2));
} else if (isOctal(value)) {
return this.ToNumber(parseInteger(strSlice(value, 2), 8));
} else if (hasNonWS(value) || isInvalidHexLiteral(value)) {
return NaN;
} else {
var trimmed = trim(value);
if (trimmed !== value) {
return this.ToNumber(trimmed);
}
}
}
return Number(value);
},
/**
* Checks if `value` is classified as a `Function` object.
*
* @private
* @param {*} value The value to check.
* @return {boolean} Returns `true` if `value` is correctly classified,
* else `false`.
*/
function tryFunctionObject(value) {
try {
fToString.call(value);
return true;
} catch (ignore) {}
return false;
}
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tointeger
// ToInteger: ES5.ToNumber,
/**
* Checks if `value` is classified as a `Function` object.
*
* @param {*} value The value to check.
* @return {boolean} Returns `true` if `value` is correctly classified,
* else `false`.
* @example
* var isFunction = require('is-function-x');
*
* isFunction(); // false
* isFunction(Number.MIN_VALUE); // false
* isFunction('abc'); // false
* isFunction(true); // false
* isFunction({ name: 'abc' }); // false
* isFunction(function () {}); // true
* isFunction(new Function ()); // true
* isFunction(function* test1() {}); // true
* isFunction(function test2(a, b) {}); // true
* isFunction(class Test {}); // true
* isFunction((x, y) => {return this;}); // true
*/
module.exports = function isFunction(value) {
if (isPrimitive(value)) {
return false;
}
if (hasToStringTag) {
return tryFunctionObject(value);
}
var strTag = toStringTag(value);
return strTag === funcTag || strTag === genTag;
};
}());
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-toint32
// ToInt32: ES5.ToInt32,
},{"has-to-string-tag-x":4,"is-primitive":6,"to-string-tag-x":9}],6:[function(_dereq_,module,exports){
/*!
* is-primitive <https://github.com/jonschlinkert/is-primitive>
*
* Copyright (c) 2014-2015, Jon Schlinkert.
* Licensed under the MIT License.
*/
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-touint32
// ToUint32: ES5.ToUint32,
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-toint16
ToInt16: function ToInt16(argument) {
var int16bit = this.ToUint16(argument);
return int16bit >= 0x8000 ? int16bit - 0x10000 : int16bit;
},
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-touint16
// ToUint16: ES5.ToUint16,
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-toint8
ToInt8: function ToInt8(argument) {
var int8bit = this.ToUint8(argument);
return int8bit >= 0x80 ? int8bit - 0x100 : int8bit;
},
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-touint8
ToUint8: function ToUint8(argument) {
var number = this.ToNumber(argument);
if ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; }
var posInt = sign(number) * Math.floor(Math.abs(number));
return mod(posInt, 0x100);
},
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-touint8clamp
ToUint8Clamp: function ToUint8Clamp(argument) {
var number = this.ToNumber(argument);
if ($isNaN(number) || number <= 0) { return 0; }
if (number >= 0xFF) { return 0xFF; }
var f = Math.floor(argument);
if (f + 0.5 < number) { return f + 1; }
if (number < f + 0.5) { return f; }
if (f % 2 !== 0) { return f + 1; }
return f;
},
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tostring
ToString: function ToString(argument) {
if (typeof argument === 'symbol') {
throw new TypeError('Cannot convert a Symbol value to a string');
}
return String(argument);
},
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-toobject
ToObject: function ToObject(value) {
this.RequireObjectCoercible(value);
return Object(value);
},
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-topropertykey
ToPropertyKey: function ToPropertyKey(argument) {
var key = this.ToPrimitive(argument, String);
return typeof key === 'symbol' ? symbolToStr.call(key) : this.ToString(key);
},
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength
ToLength: function ToLength(argument) {
var len = this.ToInteger(argument);
if (len <= 0) { return 0; } // includes converting -0 to +0
if (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; }
return len;
},
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-canonicalnumericindexstring
CanonicalNumericIndexString: function CanonicalNumericIndexString(argument) {
if (toStr.call(argument) !== '[object String]') {
throw new TypeError('must be a string');
}
if (argument === '-0') { return -0; }
var n = this.ToNumber(argument);
if (this.SameValue(this.ToString(n), argument)) { return n; }
},
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-requireobjectcoercible
RequireObjectCoercible: ES5.CheckObjectCoercible,
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-isarray
IsArray: Array.isArray || function IsArray(argument) {
return toStr.call(argument) === '[object Array]';
},
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-iscallable
// IsCallable: ES5.IsCallable,
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-isconstructor
IsConstructor: function IsConstructor(argument) {
return this.IsCallable(argument); // unfortunately there's no way to truly check this without try/catch `new argument`
},
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-isextensible-o
IsExtensible: function IsExtensible(obj) {
if (!Object.preventExtensions) { return true; }
if (isPrimitive(obj)) {
return false;
}
return Object.isExtensible(obj);
},
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-isinteger
IsInteger: function IsInteger(argument) {
if (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) {
return false;
}
var abs = Math.abs(argument);
return Math.floor(abs) === abs;
},
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-ispropertykey
IsPropertyKey: function IsPropertyKey(argument) {
return typeof argument === 'string' || typeof argument === 'symbol';
},
// http://www.ecma-international.org/ecma-262/6.0/#sec-isregexp
IsRegExp: function IsRegExp(argument) {
if (!argument || typeof argument !== 'object') {
return false;
}
if (hasSymbols) {
var isRegExp = RegExp[Symbol.match];
if (typeof isRegExp !== 'undefined') {
return ES5.ToBoolean(isRegExp);
}
}
return hasRegExpMatcher(argument);
},
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevalue
// SameValue: ES5.SameValue,
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero
SameValueZero: function SameValueZero(x, y) {
return (x === y) || ($isNaN(x) && $isNaN(y));
}
});
delete ES6.CheckObjectCoercible; // renamed in ES6 to RequireObjectCoercible
module.exports = ES6;
},{"./es5":4,"./helpers/assign":7,"./helpers/isFinite":8,"./helpers/isPrimitive":9,"./helpers/mod":10,"./helpers/sign":11,"es-to-primitive/es6":13,"function-bind":16,"is-regex":19}],6:[function(_dereq_,module,exports){
'use strict';
var ES6 = _dereq_('./es6');
var assign = _dereq_('./helpers/assign');
var ES7 = assign(ES6, {
// https://github.com/tc39/ecma262/pull/60
SameValueNonNumber: function SameValueNonNumber(x, y) {
if (typeof x === 'number' || typeof x !== typeof y) {
throw new TypeError('SameValueNonNumber requires two non-number values of the same type.');
}
return this.SameValue(x, y);
}
});
module.exports = ES7;
},{"./es6":5,"./helpers/assign":7}],7:[function(_dereq_,module,exports){
var has = Object.prototype.hasOwnProperty;
module.exports = Object.assign || function assign(target, source) {
for (var key in source) {
if (has.call(source, key)) {
target[key] = source[key];
}
}
return target;
};
},{}],8:[function(_dereq_,module,exports){
var $isNaN = Number.isNaN || function (a) { return a !== a; };
module.exports = Number.isFinite || function (x) { return typeof x === 'number' && !$isNaN(x) && x !== Infinity && x !== -Infinity; };
},{}],9:[function(_dereq_,module,exports){
// see http://jsperf.com/testing-value-is-primitive/7
module.exports = function isPrimitive(value) {
return value === null || (typeof value !== 'function' && typeof value !== 'object');
return value == null || (typeof value !== 'function' && typeof value !== 'object');
};
},{}],10:[function(_dereq_,module,exports){
module.exports = function mod(number, modulo) {
var remain = number % modulo;
return Math.floor(remain >= 0 ? remain : remain + modulo);
};
},{}],7:[function(_dereq_,module,exports){
/**
* lodash 3.0.0 (Custom Build) <https://lodash.com/>
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
* Based on Underscore.js 1.7.0 <http://underscorejs.org/LICENSE>
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license <https://lodash.com/license>
*/
},{}],11:[function(_dereq_,module,exports){
module.exports = function sign(number) {
return number >= 0 ? 1 : -1;
};
/**
* Checks if `value` is `null`.
*
* @static
* @memberOf _
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is `null`, else `false`.
* @example
*
* _.isNull(null);
* // => true
*
* _.isNull(void 0);
* // => false
*/
function isNull(value) {
return value === null;
}
},{}],12:[function(_dereq_,module,exports){
'use strict';
module.exports = isNull;
var toStr = Object.prototype.toString;
},{}],8:[function(_dereq_,module,exports){
/**
* @file
* <a href="https://travis-ci.org/Xotic750/regexp-escape-x"
* title="Travis status">
* <img src="https://travis-ci.org/Xotic750/regexp-escape-x.svg?branch=master"
* alt="Travis status" height="18">
* </a>
* <a href="https://david-dm.org/Xotic750/regexp-escape-x"
* title="Dependency status">
* <img src="https://david-dm.org/Xotic750/regexp-escape-x.svg"
* alt="Dependency status" height="18"/>
* </a>
* <a href="https://david-dm.org/Xotic750/regexp-escape-x#info=devDependencies"
* title="devDependency status">
* <img src="https://david-dm.org/Xotic750/regexp-escape-x/dev-status.svg"
* alt="devDependency status" height="18"/>
* </a>
* <a href="https://badge.fury.io/js/regexp-escape-x" title="npm version">
* <img src="https://badge.fury.io/js/regexp-escape-x.svg"
* alt="npm version" height="18">
* </a>
*
* regexpEscape module.
*
* <h2>ECMAScript compatibility shims for legacy JavaScript engines</h2>
* `es5-shim.js` monkey-patches a JavaScript context to contain all EcmaScript 5
* methods that can be faithfully emulated with a legacy JavaScript engine.
*
* `es5-sham.js` monkey-patches other ES5 methods as closely as possible.
* For these methods, as closely as possible to ES5 is not very close.
* Many of these shams are intended only to allow code to be written to ES5
* without causing run-time errors in older engines. In many cases,
* this means that these shams cause many ES5 methods to silently fail.
* Decide carefully whether this is what you want. Note: es5-sham.js requires
* es5-shim.js to be able to work properly.
*
* `json3.js` monkey-patches the EcmaScript 5 JSON implimentation faithfully.
*
* `es6.shim.js` provides compatibility shims so that legacy JavaScript engines
* behave as closely as possible to ECMAScript 6 (Harmony).
*
* @version 1.0.0
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module regexp-escape-x
*/
var isPrimitive = _dereq_('./helpers/isPrimitive');
/*jslint maxlen:80, es6:false, white:true */
var isCallable = _dereq_('is-callable');
/*jshint bitwise:true, camelcase:true, curly:true, eqeqeq:true, forin:true,
freeze:true, futurehostile:true, latedef:true, newcap:true, nocomma:true,
nonbsp:true, singleGroups:true, strict:true, undef:true, unused:true,
es3:true, esnext:false, plusplus:true, maxparams:1, maxdepth:1,
maxstatements:4, maxcomplexity:1 */
// https://es5.github.io/#x8.12
var ES5internalSlots = {
'[[DefaultValue]]': function (O, hint) {
var actualHint = hint || (toStr.call(O) === '[object Date]' ? String : Number);
/*global module */
if (actualHint === String || actualHint === Number) {
var methods = actualHint === String ? ['toString', 'valueOf'] : ['valueOf', 'toString'];
var value, i;
for (i = 0; i < methods.length; ++i) {
if (isCallable(O[methods[i]])) {
value = O[methods[i]]();
if (isPrimitive(value)) {
return value;
}
}
}
throw new TypeError('No default value');
}
throw new TypeError('invalid [[DefaultValue]] hint supplied');
}
};
;(function () {
'use strict';
// https://es5.github.io/#x9
module.exports = function ToPrimitive(input, PreferredType) {
if (isPrimitive(input)) {
return input;
}
return ES5internalSlots['[[DefaultValue]]'](input, PreferredType);
};
var $toString = _dereq_('to-string-x');
var pReplace = String.prototype.replace;
var syntaxChars = /[\^\$\\\.\*\+\?\(\)\[\]\{\}\|]/g;
},{"./helpers/isPrimitive":14,"is-callable":17}],13:[function(_dereq_,module,exports){
'use strict';
/**
* Method to safely escape `RegExp` special tokens for use in `new RegExp`.
*
* @param {string} string The string to be escaped.
* @return {string} The escaped string.
* @example
* var regexpEscape = require('regexp-escape-x');
* var str = 'hello. how are you?';
* var regex = new RegExp(regexpEscape(str), 'g');
* String(regex); // '/hello\. how are you\?/g'
*/
module.exports = function regexpEscape(string) {
return pReplace.call($toString(string), syntaxChars, '\\$&');
};
}());
var hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol';
},{"to-string-x":10}],9:[function(_dereq_,module,exports){
/**
* @file
* <a href="https://travis-ci.org/Xotic750/to-string-tag-x"
* title="Travis status">
* <img src="https://travis-ci.org/Xotic750/to-string-tag-x.svg?branch=master"
* alt="Travis status" height="18">
* </a>
* <a href="https://david-dm.org/Xotic750/to-string-tag-x"
* title="Dependency status">
* <img src="https://david-dm.org/Xotic750/to-string-tag-x.svg"
* alt="Dependency status" height="18"/>
* </a>
* <a href="https://david-dm.org/Xotic750/to-string-tag-x#info=devDependencies"
* title="devDependency status">
* <img src="https://david-dm.org/Xotic750/to-string-tag-x/dev-status.svg"
* alt="devDependency status" height="18"/>
* </a>
* <a href="https://badge.fury.io/js/to-string-tag-x" title="npm version">
* <img src="https://badge.fury.io/js/to-string-tag-x.svg"
* alt="npm version" height="18">
* </a>
*
* Get an object's @@toStringTag. Includes fixes to correct ES3 differences
* for the following.
* - undefined => '[object Undefined]'
* - null => '[object Null]'
*
* No other fixes are included, so legacy `arguments` will
* give `[object Object]`, and many older native objects
* give `[object Object]`. There are also other environmental bugs
* for example `RegExp` gives `[object Function]` and `Uint8Array`
* gives `[object Object]` on certain engines. While these and more could
* be fixed, it was decided that this should be a very raw version and it
* is left to the coder to use other `is` implimentations for detection.
* It is also worth noting that as of ES6 `Symbol.toStringTag` can be set on
* an object and therefore can report any string that it wishes.
*
* <h2>ECMAScript compatibility shims for legacy JavaScript engines</h2>
* `es5-shim.js` monkey-patches a JavaScript context to contain all EcmaScript 5
* methods that can be faithfully emulated with a legacy JavaScript engine.
*
* `es5-sham.js` monkey-patches other ES5 methods as closely as possible.
* For these methods, as closely as possible to ES5 is not very close.
* Many of these shams are intended only to allow code to be written to ES5
* without causing run-time errors in older engines. In many cases,
* this means that these shams cause many ES5 methods to silently fail.
* Decide carefully whether this is what you want. Note: es5-sham.js requires
* es5-shim.js to be able to work properly.
*
* `json3.js` monkey-patches the EcmaScript 5 JSON implimentation faithfully.
*
* `es6.shim.js` provides compatibility shims so that legacy JavaScript engines
* behave as closely as possible to ECMAScript 6 (Harmony).
*
* @version 1.0.6
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module to-string-tag-x
*/
var isPrimitive = _dereq_('./helpers/isPrimitive');
var isCallable = _dereq_('is-callable');
var isDate = _dereq_('is-date-object');
var isSymbol = _dereq_('is-symbol');
/*jslint maxlen:80, es6:false, white:true */
var ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) {
if (typeof O === 'undefined' || O === null) {
throw new TypeError('Cannot call method on ' + O);
}
if (typeof hint !== 'string' || (hint !== 'number' && hint !== 'string')) {
throw new TypeError('hint must be "string" or "number"');
}
var methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString'];
var method, result, i;
for (i = 0; i < methodNames.length; ++i) {
method = O[methodNames[i]];
if (isCallable(method)) {
result = method.call(O);
if (isPrimitive(result)) {
return result;
}
}
}
throw new TypeError('No default value');
};
/*jshint bitwise:true, camelcase:true, curly:true, eqeqeq:true, forin:true,
freeze:true, futurehostile:true, latedef:true, newcap:true, nocomma:true,
nonbsp:true, singleGroups:true, strict:true, undef:true, unused:true,
es3:true, esnext:false, plusplus:true, maxparams:1, maxdepth:1,
maxstatements:6, maxcomplexity:3 */
var GetMethod = function GetMethod(O, P) {
var func = O[P];
if (func !== null && typeof func !== 'undefined') {
if (!isCallable(func)) {
throw new TypeError(func + ' returned for property ' + P + ' of object ' + O + ' is not a function');
}
return func;
}
};
/*global module */
// http://www.ecma-international.org/ecma-262/6.0/#sec-toprimitive
module.exports = function ToPrimitive(input, PreferredType) {
if (isPrimitive(input)) {
return input;
}
var hint = 'default';
if (arguments.length > 1) {
if (PreferredType === String) {
hint = 'string';
} else if (PreferredType === Number) {
hint = 'number';
}
}
;(function () {
'use strict';
var exoticToPrim;
if (hasSymbols) {
if (Symbol.toPrimitive) {
exoticToPrim = GetMethod(input, Symbol.toPrimitive);
} else if (isSymbol(input)) {
exoticToPrim = Symbol.prototype.valueOf;
}
}
if (typeof exoticToPrim !== 'undefined') {
var result = exoticToPrim.call(input, hint);
if (isPrimitive(result)) {
return result;
}
throw new TypeError('unable to convert exotic object to primitive');
}
if (hint === 'default' && (isDate(input) || isSymbol(input))) {
hint = 'string';
}
return ordinaryToPrimitive(input, hint === 'default' ? 'number' : hint);
};
var pToString = Object.prototype.toString;
var isNull = _dereq_('lodash.isnull');
var isUndefined = _dereq_('validate.io-undefined');
var nullTag = '[object Null]';
var undefTag = '[object Undefined]';
},{"./helpers/isPrimitive":14,"is-callable":17,"is-date-object":18,"is-symbol":20}],14:[function(_dereq_,module,exports){
arguments[4][9][0].apply(exports,arguments)
},{"dup":9}],15:[function(_dereq_,module,exports){
var hasOwn = Object.prototype.hasOwnProperty;
var toString = Object.prototype.toString;
module.exports = function forEach (obj, fn, ctx) {
if (toString.call(fn) !== '[object Function]') {
throw new TypeError('iterator must be a function');
/**
* The `toStringTag` method returns "[object type]", where type is the
* object type.
*
* @param {*} value The object of which to get the object type string.
* @return {string} The object type string.
* @example
* var o = new Object();
*
* toStringTag(o); // returns '[object Object]'
*/
module.exports = function toStringTag(value) {
if (isNull(value)) {
return nullTag;
}
var l = obj.length;
if (l === +l) {
for (var i = 0; i < l; i++) {
fn.call(ctx, obj[i], i, obj);
}
} else {
for (var k in obj) {
if (hasOwn.call(obj, k)) {
fn.call(ctx, obj[k], k, obj);
}
}
if (isUndefined(value)) {
return undefTag;
}
};
return pToString.call(value);
};
}());
},{"lodash.isnull":7,"validate.io-undefined":11}],10:[function(_dereq_,module,exports){
/**
* @file
* <a href="https://travis-ci.org/Xotic750/to-string-x"
* title="Travis status">
* <img src="https://travis-ci.org/Xotic750/to-string-x.svg?branch=master"
* alt="Travis status" height="18">
* </a>
* <a href="https://david-dm.org/Xotic750/to-string-x"
* title="Dependency status">
* <img src="https://david-dm.org/Xotic750/to-string-x.svg"
* alt="Dependency status" height="18"/>
* </a>
* <a href="https://david-dm.org/Xotic750/to-string-x#info=devDependencies"
* title="devDependency status">
* <img src="https://david-dm.org/Xotic750/to-string-x/dev-status.svg"
* alt="devDependency status" height="18"/>
* </a>
* <a href="https://badge.fury.io/js/to-string-x" title="npm version">
* <img src="https://badge.fury.io/js/to-string-x.svg"
* alt="npm version" height="18">
* </a>
*
* ToString module.
*
* <h2>ECMAScript compatibility shims for legacy JavaScript engines</h2>
* `es5-shim.js` monkey-patches a JavaScript context to contain all EcmaScript 5
* methods that can be faithfully emulated with a legacy JavaScript engine.
*
* `es5-sham.js` monkey-patches other ES5 methods as closely as possible.
* For these methods, as closely as possible to ES5 is not very close.
* Many of these shams are intended only to allow code to be written to ES5
* without causing run-time errors in older engines. In many cases,
* this means that these shams cause many ES5 methods to silently fail.
* Decide carefully whether this is what you want. Note: es5-sham.js requires
* es5-shim.js to be able to work properly.
*
* `json3.js` monkey-patches the EcmaScript 5 JSON implimentation faithfully.
*
* `es6.shim.js` provides compatibility shims so that legacy JavaScript engines
* behave as closely as possible to ECMAScript 6 (Harmony).
*
* @version 1.0.0
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module to-string-x
*/
},{}],16:[function(_dereq_,module,exports){
var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
var slice = Array.prototype.slice;
var toStr = Object.prototype.toString;
var funcType = '[object Function]';
/*jslint maxlen:80, es6:true, white:true */
module.exports = function bind(that) {
var target = this;
if (typeof target !== 'function' || toStr.call(target) !== funcType) {
throw new TypeError(ERROR_MESSAGE + target);
}
var args = slice.call(arguments, 1);
/*jshint bitwise:true, camelcase:true, curly:true, eqeqeq:true, forin:true,
freeze:true, futurehostile:true, latedef:true, newcap:true, nocomma:true,
nonbsp:true, singleGroups:true, strict:true, undef:true, unused:true,
es3:false, esnext:true, plusplus:true, maxparams:1, maxdepth:1,
maxstatements:3, maxcomplexity:2 */
var binder = function () {
if (this instanceof bound) {
var result = target.apply(
this,
args.concat(slice.call(arguments))
);
if (Object(result) === result) {
return result;
}
return this;
} else {
return target.apply(
that,
args.concat(slice.call(arguments))
);
}
};
/*global module */
var boundLength = Math.max(0, target.length - args.length);
var boundArgs = [];
for (var i = 0; i < boundLength; i++) {
boundArgs.push('$' + i);
}
;(function () {
'use strict';
var bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);
var $String = String;
if (target.prototype) {
var Empty = function Empty() {};
Empty.prototype = target.prototype;
bound.prototype = new Empty();
Empty.prototype = null;
/**
* The abstract operation ToString converts argument to a value of type
* String.
*
* @param {*} value The value to convert to a string.
* @throws {TypeError} If `value` is a Symbol.
* @return {string} The converted value.
* @example
* var $toString = require('to-string-x');
*
* $toString(); // 'undefined'
* $toString(null); // 'null'
* $toString('abc'); // 'abc'
* $toString(true); // 'true'
* $toString(Symbol('foo')); // TypeError
* $toString(Symbol.iterator); // TypeError
* $toString(Object(Symbol.iterator)); // TypeError
*/
module.exports = function ToString(value) {
if (typeof value === 'symbol') {
throw new TypeError('Cannot convert a Symbol value to a string');
}
return bound;
};
},{}],17:[function(_dereq_,module,exports){
'use strict';
var fnToStr = Function.prototype.toString;
var constructorRegex = /\s*class /;
var isES6ClassFn = function isES6ClassFn(value) {
try {
var fnStr = fnToStr.call(value);
var singleStripped = fnStr.replace(/\/\/.*\n/g, '');
var multiStripped = singleStripped.replace(/\/\*[.\s\S]*\*\//g, '');
var spaceStripped = multiStripped.replace(/\n/mg, ' ').replace(/ {2}/g, ' ');
return constructorRegex.test(spaceStripped);
} catch (e) {
return false; // not a function
}
};
var tryFunctionObject = function tryFunctionObject(value) {
try {
if (isES6ClassFn(value)) { return false; }
fnToStr.call(value);
return true;
} catch (e) {
return false;
}
};
var toStr = Object.prototype.toString;
var fnClass = '[object Function]';
var genClass = '[object GeneratorFunction]';
var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
module.exports = function isCallable(value) {
if (!value) { return false; }
if (typeof value !== 'function' && typeof value !== 'object') { return false; }
if (hasToStringTag) { return tryFunctionObject(value); }
if (isES6ClassFn(value)) { return false; }
var strClass = toStr.call(value);
return strClass === fnClass || strClass === genClass;
};
},{}],18:[function(_dereq_,module,exports){
'use strict';
var getDay = Date.prototype.getDay;
var tryDateObject = function tryDateObject(value) {
try {
getDay.call(value);
return true;
} catch (e) {
return false;
}
};
var toStr = Object.prototype.toString;
var dateClass = '[object Date]';
var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
module.exports = function isDateObject(value) {
if (typeof value !== 'object' || value === null) { return false; }
return hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass;
};
},{}],19:[function(_dereq_,module,exports){
'use strict';
var regexExec = RegExp.prototype.exec;
var tryRegexExec = function tryRegexExec(value) {
try {
regexExec.call(value);
return true;
} catch (e) {
return false;
}
};
var toStr = Object.prototype.toString;
var regexClass = '[object RegExp]';
var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
module.exports = function isRegex(value) {
if (typeof value !== 'object') { return false; }
return hasToStringTag ? tryRegexExec(value) : toStr.call(value) === regexClass;
};
},{}],20:[function(_dereq_,module,exports){
'use strict';
var toStr = Object.prototype.toString;
var hasSymbols = typeof Symbol === 'function' && typeof Symbol() === 'symbol';
if (hasSymbols) {
var symToStr = Symbol.prototype.toString;
var symStringRegex = /^Symbol\(.*\)$/;
var isSymbolObject = function isSymbolObject(value) {
if (typeof value.valueOf() !== 'symbol') { return false; }
return symStringRegex.test(symToStr.call(value));
};
module.exports = function isSymbol(value) {
if (typeof value === 'symbol') { return true; }
if (toStr.call(value) !== '[object Symbol]') { return false; }
try {
return isSymbolObject(value);
} catch (e) {
return false;
}
};
} else {
module.exports = function isSymbol(value) {
// this environment does not support Symbols.
return false;
};
}
},{}],21:[function(_dereq_,module,exports){
'use strict';
// modified from https://github.com/es-shims/es5-shim
var has = Object.prototype.hasOwnProperty;
var toStr = Object.prototype.toString;
var slice = Array.prototype.slice;
var isArgs = _dereq_('./isArguments');
var hasDontEnumBug = !({ toString: null }).propertyIsEnumerable('toString');
var hasProtoEnumBug = function () {}.propertyIsEnumerable('prototype');
var dontEnums = [
'toString',
'toLocaleString',
'valueOf',
'hasOwnProperty',
'isPrototypeOf',
'propertyIsEnumerable',
'constructor'
];
var equalsConstructorPrototype = function (o) {
var ctor = o.constructor;
return ctor && ctor.prototype === o;
};
var blacklistedKeys = {
$console: true,
$frame: true,
$frameElement: true,
$frames: true,
$parent: true,
$self: true,
$webkitIndexedDB: true,
$webkitStorageInfo: true,
$window: true
};
var hasAutomationEqualityBug = (function () {
/* global window */
if (typeof window === 'undefined') { return false; }
for (var k in window) {
try {
if (!blacklistedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {
try {
equalsConstructorPrototype(window[k]);
} catch (e) {
return true;
}
}
} catch (e) {
return true;
}
}
return false;
return $String(value);
};
}());
var equalsConstructorPrototypeIfNotBuggy = function (o) {
/* global window */
if (typeof window === 'undefined' || !hasAutomationEqualityBug) {
return equalsConstructorPrototype(o);
}
try {
return equalsConstructorPrototype(o);
} catch (e) {
return false;
}
};
var keysShim = function keys(object) {
var isObject = object !== null && typeof object === 'object';
var isFunction = toStr.call(object) === '[object Function]';
var isArguments = isArgs(object);
var isString = isObject && toStr.call(object) === '[object String]';
var theKeys = [];
},{}],11:[function(_dereq_,module,exports){
/**
*
* VALIDATE: undefined
*
*
* DESCRIPTION:
* - Validates if a value is undefined.
*
*
* NOTES:
* [1]
*
*
* TODO:
* [1]
*
*
* LICENSE:
* MIT
*
* Copyright (c) 2014. Athan Reines.
*
*
* AUTHOR:
* Athan Reines. kgryte@gmail.com. 2014.
*
*/
if (!isObject && !isFunction && !isArguments) {
throw new TypeError('Object.keys called on a non-object');
}
var skipProto = hasProtoEnumBug && isFunction;
if (isString && object.length > 0 && !has.call(object, 0)) {
for (var i = 0; i < object.length; ++i) {
theKeys.push(String(i));
}
}
if (isArguments && object.length > 0) {
for (var j = 0; j < object.length; ++j) {
theKeys.push(String(j));
}
} else {
for (var name in object) {
if (!(skipProto && name === 'prototype') && has.call(object, name)) {
theKeys.push(String(name));
}
}
}
if (hasDontEnumBug) {
var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);
for (var k = 0; k < dontEnums.length; ++k) {
if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {
theKeys.push(dontEnums[k]);
}
}
}
return theKeys;
};
keysShim.shim = function shimObjectKeys() {
if (Object.keys) {
var keysWorksWithArguments = (function () {
// Safari 5.0 bug
return (Object.keys(arguments) || '').length === 2;
}(1, 2));
if (!keysWorksWithArguments) {
var originalKeys = Object.keys;
Object.keys = function keys(object) {
if (isArgs(object)) {
return originalKeys(slice.call(object));
} else {
return originalKeys(object);
}
};
}
} else {
Object.keys = keysShim;
}
return Object.keys || keysShim;
};
module.exports = keysShim;
},{"./isArguments":22}],22:[function(_dereq_,module,exports){
'use strict';
var toStr = Object.prototype.toString;
/**
* FUNCTION: isUndefined( value )
* Validates if a value is undefined.
*
* @param {*} value - value to be validated
* @returns {Boolean} boolean indicating whether value is undefined
*/
function isUndefined( value ) {
return value === void 0;
} // end FUNCTION isUndefined()
module.exports = function isArguments(value) {
var str = toStr.call(value);
var isArgs = str === '[object Arguments]';
if (!isArgs) {
isArgs = str !== '[object Array]' &&
value !== null &&
typeof value === 'object' &&
typeof value.length === 'number' &&
value.length >= 0 &&
toStr.call(value.callee) === '[object Function]';
}
return isArgs;
};
},{}],23:[function(_dereq_,module,exports){
'use strict';
// EXPORTS //
var define = _dereq_('define-properties');
var ES = _dereq_('es-abstract/es7');
var bind = _dereq_('function-bind');
var replace = bind.call(Function.call, String.prototype.replace);
var syntaxChars = /[\^\$\\\.\*\+\?\(\)\[\]\{\}\|]/g;
module.exports = isUndefined;
var escapeShim = function escape(S) {
return replace(ES.ToString(S), syntaxChars, '\\$&');
};
define(escapeShim, {
method: escapeShim,
shim: function shimRegExpEscape() {
define(RegExp, {
escape: escapeShim
});
return RegExp.escape;
}
});
module.exports = escapeShim;
},{"define-properties":2,"es-abstract/es7":6,"function-bind":16}]},{},[1])(1)
},{}]},{},[1])(1)
});

@@ -1,2 +0,2 @@

!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.returnExports=t()}}(function(){return function e(t,r,n){function s(i,u){if(!r[i]){if(!t[i]){var c="function"==typeof require&&require;if(!u&&c)return c(i,!0);if(o)return o(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var l=r[i]={exports:{}};t[i][0].call(l.exports,function(e){var r=t[i][1][e];return s(r?r:e)},l,l.exports,e,t,r,n)}return r[i].exports}for(var o="function"==typeof require&&require,i=0;i<n.length;i++)s(n[i]);return s}({1:[function(t,e,r){!function(){"use strict";var r=t("define-property-x"),n=t("regexp.escape"),o=[9,10,11,12,13,32,160,5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288,65279],i={s:o.reduce(function(t,e){return t+String.fromCharCode(e)},""),w:function(){var t=65536,e="";do t-=1,o.indexOf(t)<0&&(e=String.fromCharCode(t)+e);while(t);return e}()};i.se=(i.s+i.w).replace(/\s/g,"")!==i.w?n(i.s):"\\s",i.we=(i.s+i.w).replace(/\w/g,"")!==i.s?n(i.w):"\\w",e.exports=function generateString(t,e){return t===!0?e===!0?i.we:i.w:e===!0?i.se:i.s},r(e.exports,"whiteSpaces",o),r(e.exports,"escape",n)}()},{"define-property-x":3,"regexp.escape":23}],2:[function(t,e,r){"use strict";var n=t("object-keys"),o=t("foreach"),i="function"==typeof Symbol&&"symbol"==typeof Symbol(),u=Object.prototype.toString,c=function(t){return"function"==typeof t&&"[object Function]"===u.call(t)},a=function(){var t={};try{Object.defineProperty(t,"x",{enumerable:!1,value:t});for(var e in t)return!1;return t.x===t}catch(r){return!1}},s=Object.defineProperty&&a(),l=function(t,e,r,n){(!(e in t)||c(n)&&n())&&(s?Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:r,writable:!0}):t[e]=r)},f=function(t,e){var r=arguments.length>2?arguments[2]:{},u=n(e);i&&(u=u.concat(Object.getOwnPropertySymbols(e))),o(u,function(n){l(t,n,e[n],r[n])})};f.supportsDescriptors=!!s,e.exports=f},{foreach:15,"object-keys":21}],3:[function(t,e,r){!function(){"use strict";function truePredicate(){return!0}var r=t("define-properties");e.exports=function defineProperty(t,e,n,o){var i={},u={};i[e]=n,o===!0&&(u[e]=truePredicate),r(t,i,u)}}()},{"define-properties":2}],4:[function(t,e,r){"use strict";var n=Number.isNaN||function(t){return t!==t},o=t("./helpers/isFinite"),i=t("./helpers/sign"),u=t("./helpers/mod"),c=t("is-callable"),a=t("es-to-primitive/es5"),s={ToPrimitive:a,ToBoolean:function ToBoolean(t){return Boolean(t)},ToNumber:function ToNumber(t){return Number(t)},ToInteger:function ToInteger(t){var e=this.ToNumber(t);return n(e)?0:0!==e&&o(e)?i(e)*Math.floor(Math.abs(e)):e},ToInt32:function ToInt32(t){return this.ToNumber(t)>>0},ToUint32:function ToUint32(t){return this.ToNumber(t)>>>0},ToUint16:function ToUint16(t){var e=this.ToNumber(t);if(n(e)||0===e||!o(e))return 0;var r=i(e)*Math.floor(Math.abs(e));return u(r,65536)},ToString:function ToString(t){return String(t)},ToObject:function ToObject(t){return this.CheckObjectCoercible(t),Object(t)},CheckObjectCoercible:function CheckObjectCoercible(t,e){if(null==t)throw new TypeError(e||"Cannot call method on "+t);return t},IsCallable:c,SameValue:function SameValue(t,e){return t===e?0===t?1/t===1/e:!0:n(t)&&n(e)}};e.exports=s},{"./helpers/isFinite":8,"./helpers/mod":10,"./helpers/sign":11,"es-to-primitive/es5":12,"is-callable":17}],5:[function(t,e,r){"use strict";var n=Object.prototype.toString,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,i=o?Symbol.prototype.toString:n,u=Number.isNaN||function(t){return t!==t},c=t("./helpers/isFinite"),a=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,s=t("./helpers/assign"),l=t("./helpers/sign"),f=t("./helpers/mod"),p=t("./helpers/isPrimitive"),y=t("es-to-primitive/es6"),b=parseInt,m=t("function-bind"),g=m.call(Function.call,String.prototype.slice),h=m.call(Function.call,RegExp.prototype.test,/^0b[01]+$/i),v=m.call(Function.call,RegExp.prototype.test,/^0o[0-7]+$/i),S=["\x85","\u200b","\ufffe"].join(""),d=new RegExp("["+S+"]","g"),j=m.call(Function.call,RegExp.prototype.test,d),w=/^[\-\+]0x[0-9a-f]+$/i,T=m.call(Function.call,RegExp.prototype.test,w),x=[" \n\x0B\f\r \xa0\u1680\u180e\u2000\u2001\u2002\u2003","\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028","\u2029\ufeff"].join(""),O=new RegExp("(^["+x+"]+)|(["+x+"]+$)","g"),E=m.call(Function.call,String.prototype.replace),N=function(t){return E(t,O,"")},I=t("./es5"),C=t("is-regex"),P=s(s({},I),{Call:function Call(t,e){var r=arguments.length>2?arguments[2]:[];if(!this.IsCallable(t))throw new TypeError(t+" is not a function");return t.apply(e,r)},ToPrimitive:y,ToNumber:function ToNumber(t){var e=p(t)?t:y(t,"number");if("symbol"==typeof e)throw new TypeError("Cannot convert a Symbol value to a number");if("string"==typeof e){if(h(e))return this.ToNumber(b(g(e,2),2));if(v(e))return this.ToNumber(b(g(e,2),8));if(j(e)||T(e))return NaN;var r=N(e);if(r!==e)return this.ToNumber(r)}return Number(e)},ToInt16:function ToInt16(t){var e=this.ToUint16(t);return e>=32768?e-65536:e},ToInt8:function ToInt8(t){var e=this.ToUint8(t);return e>=128?e-256:e},ToUint8:function ToUint8(t){var e=this.ToNumber(t);if(u(e)||0===e||!c(e))return 0;var r=l(e)*Math.floor(Math.abs(e));return f(r,256)},ToUint8Clamp:function ToUint8Clamp(t){var e=this.ToNumber(t);if(u(e)||0>=e)return 0;if(e>=255)return 255;var r=Math.floor(t);return e>r+.5?r+1:r+.5>e?r:r%2!==0?r+1:r},ToString:function ToString(t){if("symbol"==typeof t)throw new TypeError("Cannot convert a Symbol value to a string");return String(t)},ToObject:function ToObject(t){return this.RequireObjectCoercible(t),Object(t)},ToPropertyKey:function ToPropertyKey(t){var e=this.ToPrimitive(t,String);return"symbol"==typeof e?i.call(e):this.ToString(e)},ToLength:function ToLength(t){var e=this.ToInteger(t);return 0>=e?0:e>a?a:e},CanonicalNumericIndexString:function CanonicalNumericIndexString(t){if("[object String]"!==n.call(t))throw new TypeError("must be a string");if("-0"===t)return-0;var e=this.ToNumber(t);return this.SameValue(this.ToString(e),t)?e:void 0},RequireObjectCoercible:I.CheckObjectCoercible,IsArray:Array.isArray||function IsArray(t){return"[object Array]"===n.call(t)},IsConstructor:function IsConstructor(t){return this.IsCallable(t)},IsExtensible:function IsExtensible(t){return Object.preventExtensions?p(t)?!1:Object.isExtensible(t):!0},IsInteger:function IsInteger(t){if("number"!=typeof t||u(t)||!c(t))return!1;var e=Math.abs(t);return Math.floor(e)===e},IsPropertyKey:function IsPropertyKey(t){return"string"==typeof t||"symbol"==typeof t},IsRegExp:function IsRegExp(t){if(!t||"object"!=typeof t)return!1;if(o){var e=RegExp[Symbol.match];if("undefined"!=typeof e)return I.ToBoolean(e)}return C(t)},SameValueZero:function SameValueZero(t,e){return t===e||u(t)&&u(e)}});delete P.CheckObjectCoercible,e.exports=P},{"./es5":4,"./helpers/assign":7,"./helpers/isFinite":8,"./helpers/isPrimitive":9,"./helpers/mod":10,"./helpers/sign":11,"es-to-primitive/es6":13,"function-bind":16,"is-regex":19}],6:[function(t,e,r){"use strict";var n=t("./es6"),o=t("./helpers/assign"),i=o(n,{SameValueNonNumber:function SameValueNonNumber(t,e){if("number"==typeof t||typeof t!=typeof e)throw new TypeError("SameValueNonNumber requires two non-number values of the same type.");return this.SameValue(t,e)}});e.exports=i},{"./es6":5,"./helpers/assign":7}],7:[function(t,e,r){var n=Object.prototype.hasOwnProperty;e.exports=Object.assign||function assign(t,e){for(var r in e)n.call(e,r)&&(t[r]=e[r]);return t}},{}],8:[function(t,e,r){var n=Number.isNaN||function(t){return t!==t};e.exports=Number.isFinite||function(t){return"number"==typeof t&&!n(t)&&t!==1/0&&t!==-(1/0)}},{}],9:[function(t,e,r){e.exports=function isPrimitive(t){return null===t||"function"!=typeof t&&"object"!=typeof t}},{}],10:[function(t,e,r){e.exports=function mod(t,e){var r=t%e;return Math.floor(r>=0?r:r+e)}},{}],11:[function(t,e,r){e.exports=function sign(t){return t>=0?1:-1}},{}],12:[function(t,e,r){"use strict";var n=Object.prototype.toString,o=t("./helpers/isPrimitive"),i=t("is-callable"),u={"[[DefaultValue]]":function(t,e){var r=e||("[object Date]"===n.call(t)?String:Number);if(r===String||r===Number){var u,c,a=r===String?["toString","valueOf"]:["valueOf","toString"];for(c=0;c<a.length;++c)if(i(t[a[c]])&&(u=t[a[c]](),o(u)))return u;throw new TypeError("No default value")}throw new TypeError("invalid [[DefaultValue]] hint supplied")}};e.exports=function ToPrimitive(t,e){return o(t)?t:u["[[DefaultValue]]"](t,e)}},{"./helpers/isPrimitive":14,"is-callable":17}],13:[function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,o=t("./helpers/isPrimitive"),i=t("is-callable"),u=t("is-date-object"),c=t("is-symbol"),a=function OrdinaryToPrimitive(t,e){if("undefined"==typeof t||null===t)throw new TypeError("Cannot call method on "+t);if("string"!=typeof e||"number"!==e&&"string"!==e)throw new TypeError('hint must be "string" or "number"');var r,n,u,c="string"===e?["toString","valueOf"]:["valueOf","toString"];for(u=0;u<c.length;++u)if(r=t[c[u]],i(r)&&(n=r.call(t),o(n)))return n;throw new TypeError("No default value")},s=function GetMethod(t,e){var r=t[e];if(null!==r&&"undefined"!=typeof r){if(!i(r))throw new TypeError(r+" returned for property "+e+" of object "+t+" is not a function");return r}};e.exports=function ToPrimitive(t,e){if(o(t))return t;var r="default";arguments.length>1&&(e===String?r="string":e===Number&&(r="number"));var i;if(n&&(Symbol.toPrimitive?i=s(t,Symbol.toPrimitive):c(t)&&(i=Symbol.prototype.valueOf)),"undefined"!=typeof i){var l=i.call(t,r);if(o(l))return l;throw new TypeError("unable to convert exotic object to primitive")}return"default"===r&&(u(t)||c(t))&&(r="string"),a(t,"default"===r?"number":r)}},{"./helpers/isPrimitive":14,"is-callable":17,"is-date-object":18,"is-symbol":20}],14:[function(t,e,r){arguments[4][9][0].apply(r,arguments)},{dup:9}],15:[function(t,e,r){var n=Object.prototype.hasOwnProperty,o=Object.prototype.toString;e.exports=function forEach(t,e,r){if("[object Function]"!==o.call(e))throw new TypeError("iterator must be a function");var i=t.length;if(i===+i)for(var u=0;i>u;u++)e.call(r,t[u],u,t);else for(var c in t)n.call(t,c)&&e.call(r,t[c],c,t)}},{}],16:[function(t,e,r){var n="Function.prototype.bind called on incompatible ",o=Array.prototype.slice,i=Object.prototype.toString,u="[object Function]";e.exports=function bind(t){var e=this;if("function"!=typeof e||i.call(e)!==u)throw new TypeError(n+e);for(var r=o.call(arguments,1),c=function(){if(this instanceof f){var n=e.apply(this,r.concat(o.call(arguments)));return Object(n)===n?n:this}return e.apply(t,r.concat(o.call(arguments)))},a=Math.max(0,e.length-r.length),s=[],l=0;a>l;l++)s.push("$"+l);var f=Function("binder","return function ("+s.join(",")+"){ return binder.apply(this,arguments); }")(c);if(e.prototype){var p=function Empty(){};p.prototype=e.prototype,f.prototype=new p,p.prototype=null}return f}},{}],17:[function(t,e,r){"use strict";var n=Function.prototype.toString,o=/\s*class /,i=function isES6ClassFn(t){try{var e=n.call(t),r=e.replace(/\/\/.*\n/g,""),i=r.replace(/\/\*[.\s\S]*\*\//g,""),u=i.replace(/\n/gm," ").replace(/ {2}/g," ");return o.test(u)}catch(c){return!1}},u=function tryFunctionObject(t){try{return i(t)?!1:(n.call(t),!0)}catch(e){return!1}},c=Object.prototype.toString,a="[object Function]",s="[object GeneratorFunction]",l="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;e.exports=function isCallable(t){if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(l)return u(t);if(i(t))return!1;var e=c.call(t);return e===a||e===s}},{}],18:[function(t,e,r){"use strict";var n=Date.prototype.getDay,o=function tryDateObject(t){try{return n.call(t),!0}catch(e){return!1}},i=Object.prototype.toString,u="[object Date]",c="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;e.exports=function isDateObject(t){return"object"!=typeof t||null===t?!1:c?o(t):i.call(t)===u}},{}],19:[function(t,e,r){"use strict";var n=RegExp.prototype.exec,o=function tryRegexExec(t){try{return n.call(t),!0}catch(e){return!1}},i=Object.prototype.toString,u="[object RegExp]",c="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;e.exports=function isRegex(t){return"object"!=typeof t?!1:c?o(t):i.call(t)===u}},{}],20:[function(t,e,r){"use strict";var n=Object.prototype.toString,o="function"==typeof Symbol&&"symbol"==typeof Symbol();if(o){var i=Symbol.prototype.toString,u=/^Symbol\(.*\)$/,c=function isSymbolObject(t){return"symbol"!=typeof t.valueOf()?!1:u.test(i.call(t))};e.exports=function isSymbol(t){if("symbol"==typeof t)return!0;if("[object Symbol]"!==n.call(t))return!1;try{return c(t)}catch(e){return!1}}}else e.exports=function isSymbol(t){return!1}},{}],21:[function(t,e,r){"use strict";var n=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=Array.prototype.slice,u=t("./isArguments"),c=!{toString:null}.propertyIsEnumerable("toString"),a=function(){}.propertyIsEnumerable("prototype"),s=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],l=function(t){var e=t.constructor;return e&&e.prototype===t},f={$console:!0,$frame:!0,$frameElement:!0,$frames:!0,$parent:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},p=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!f["$"+t]&&n.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{l(window[t])}catch(e){return!0}}catch(e){return!0}return!1}(),y=function(t){if("undefined"==typeof window||!p)return l(t);try{return l(t)}catch(e){return!1}},b=function keys(t){var e=null!==t&&"object"==typeof t,r="[object Function]"===o.call(t),i=u(t),l=e&&"[object String]"===o.call(t),f=[];if(!e&&!r&&!i)throw new TypeError("Object.keys called on a non-object");var p=a&&r;if(l&&t.length>0&&!n.call(t,0))for(var b=0;b<t.length;++b)f.push(String(b));if(i&&t.length>0)for(var m=0;m<t.length;++m)f.push(String(m));else for(var g in t)p&&"prototype"===g||!n.call(t,g)||f.push(String(g));if(c)for(var h=y(t),v=0;v<s.length;++v)h&&"constructor"===s[v]||!n.call(t,s[v])||f.push(s[v]);return f};b.shim=function shimObjectKeys(){if(Object.keys){var t=function(){return 2===(Object.keys(arguments)||"").length}(1,2);if(!t){var e=Object.keys;Object.keys=function keys(t){return e(u(t)?i.call(t):t)}}}else Object.keys=b;return Object.keys||b},e.exports=b},{"./isArguments":22}],22:[function(t,e,r){"use strict";var n=Object.prototype.toString;e.exports=function isArguments(t){var e=n.call(t),r="[object Arguments]"===e;return r||(r="[object Array]"!==e&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===n.call(t.callee)),r}},{}],23:[function(t,e,r){"use strict";var n=t("define-properties"),o=t("es-abstract/es7"),i=t("function-bind"),u=i.call(Function.call,String.prototype.replace),c=/[\^\$\\\.\*\+\?\(\)\[\]\{\}\|]/g,a=function escape(t){return u(o.ToString(t),c,"\\$&")};n(a,{method:a,shim:function shimRegExpEscape(){return n(RegExp,{escape:a}),RegExp.escape}}),e.exports=a},{"define-properties":2,"es-abstract/es7":6,"function-bind":16}]},{},[1])(1)});
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.returnExports=e()}}(function(){return function e(t,n,r){function s(i,u){if(!n[i]){if(!t[i]){var f="function"==typeof require&&require;if(!u&&f)return f(i,!0);if(o)return o(i,!0);var c=new Error("Cannot find module '"+i+"'");throw c.code="MODULE_NOT_FOUND",c}var p=n[i]={exports:{}};t[i][0].call(p.exports,function(e){var n=t[i][1][e];return s(n?n:e)},p,p.exports,e,t,n,r)}return n[i].exports}for(var o="function"==typeof require&&require,i=0;i<r.length;i++)s(r[i]);return s}({1:[function(e,t,n){!function(){"use strict";var n=e("define-properties-x").defineProperty,r=e("regexp-escape-x"),o=[9,10,11,12,13,32,160,5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288,65279],i={s:o.reduce(function(e,t){return e+String.fromCharCode(t)},""),w:function(){var e=65536,t="";do e-=1,o.indexOf(e)<0&&(t=String.fromCharCode(e)+t);while(e);return t}()};i.se=(i.s+i.w).replace(/\s/g,"")!==i.w?r(i.s):"\\s",i.we=(i.s+i.w).replace(/\w/g,"")!==i.s?r(i.w):"\\w",t.exports=function generateString(e,t){return e===!0?t===!0?i.we:i.w:t===!0?i.se:i.s},n(t.exports,"whiteSpaces",o),n(t.exports,"escape",r)}()},{"define-properties-x":2,"regexp-escape-x":8}],2:[function(e,t,n){!function(){"use strict";function defineProperty(e,t,n,r){t in e&&!r||(p?c(e,t,{configurable:!0,enumerable:!1,value:n,writable:!0}):e[t]=n)}function defineProperties(e,t,c){var p=o(c)?{}:c,a=s(t);n&&f&&(a=i.call(a,f(t))),u.call(a,function(n){var o=p[n];defineProperty(e,n,t[n],r(o)&&o())})}var n=e("has-symbol-support-x"),r=e("is-function-x"),o=e("validate.io-undefined"),i=Array.prototype.concat,u=Array.prototype.forEach,s=Object.keys,f=r(Object.getOwnPropertySymbols)&&Object.getOwnPropertySymbols,c=r(Object.defineProperty)&&Object.defineProperty,p=Boolean(c)&&function(e){var t={};try{c(t,"x",{enumerable:!1,value:t});for(e in t)return!1;return t.x===t}catch(n){return!1}}();defineProperties(t.exports,{defineProperty:defineProperty,defineProperties:defineProperties,supportsDescriptors:p})}()},{"has-symbol-support-x":3,"is-function-x":5,"validate.io-undefined":11}],3:[function(e,t,n){!function(){"use strict";t.exports="function"==typeof Symbol&&"symbol"==typeof Symbol()}()},{}],4:[function(e,t,n){!function(){"use strict";t.exports=e("has-symbol-support-x")&&"symbol"==typeof Symbol.toStringTag}()},{"has-symbol-support-x":3}],5:[function(e,t,n){!function(){"use strict";function tryFunctionObject(e){try{return n.call(e),!0}catch(t){}return!1}var n=Function.prototype.toString,r=e("to-string-tag-x"),o=e("has-to-string-tag-x"),i=e("is-primitive"),u="[object Function]",s="[object GeneratorFunction]";t.exports=function isFunction(e){if(i(e))return!1;if(o)return tryFunctionObject(e);var t=r(e);return t===u||t===s}}()},{"has-to-string-tag-x":4,"is-primitive":6,"to-string-tag-x":9}],6:[function(e,t,n){"use strict";t.exports=function isPrimitive(e){return null==e||"function"!=typeof e&&"object"!=typeof e}},{}],7:[function(e,t,n){function isNull(e){return null===e}t.exports=isNull},{}],8:[function(e,t,n){!function(){"use strict";var n=e("to-string-x"),r=String.prototype.replace,o=/[\^\$\\\.\*\+\?\(\)\[\]\{\}\|]/g;t.exports=function regexpEscape(e){return r.call(n(e),o,"\\$&")}}()},{"to-string-x":10}],9:[function(e,t,n){!function(){"use strict";var n=Object.prototype.toString,r=e("lodash.isnull"),o=e("validate.io-undefined"),i="[object Null]",u="[object Undefined]";t.exports=function toStringTag(e){return r(e)?i:o(e)?u:n.call(e)}}()},{"lodash.isnull":7,"validate.io-undefined":11}],10:[function(e,t,n){!function(){"use strict";var e=String;t.exports=function ToString(t){if("symbol"==typeof t)throw new TypeError("Cannot convert a Symbol value to a string");return e(t)}}()},{}],11:[function(e,t,n){"use strict";function isUndefined(e){return void 0===e}t.exports=isUndefined},{}]},{},[1])(1)});
//# sourceMappingURL=lib/white-space-x.map
{
"name": "white-space-x",
"version": "1.0.3",
"version": "1.0.4",
"description": "whitespace module.",

@@ -33,4 +33,4 @@ "homepage": "https://github.com/Xotic750/white-space-x",

"dependencies": {
"define-property-x": "^1.0.8",
"regexp.escape": "^1.0.2"
"define-properties-x": "^1.0.0",
"regexp-escape-x": "^1.0.0"
},

@@ -37,0 +37,0 @@ "devDependencies": {

@@ -42,3 +42,3 @@ <a name="module_white-space-x"></a>

**Version**: 1.0.3
**Version**: 1.0.4
**Author:** Xotic750 <Xotic750@gmail.com>

@@ -45,0 +45,0 @@ **License**: [MIT](&lt;https://opensource.org/licenses/MIT&gt;)

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc