Socket
Socket
Sign inDemoInstall

trim-left-x

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

trim-left-x - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

2

index.js
/**
* @file This method removes whitespace from the left end of a string.
* @version 1.3.0
* @version 1.3.1
* @author Xotic750 <Xotic750@gmail.com>

@@ -5,0 +5,0 @@ * @copyright Xotic750

(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){
/**
* @file This method removes whitespace from the left end of a string.
* @version 1.3.0
* @version 1.3.1
* @author Xotic750 <Xotic750@gmail.com>

@@ -30,71 +30,631 @@ * @copyright Xotic750

},{"to-string-x":5,"white-space-x":6}],2:[function(_dereq_,module,exports){
var isFunction = _dereq_('is-function')
},{"to-string-x":31,"white-space-x":33}],2:[function(_dereq_,module,exports){
/**
* @file Executes a provided function once for each array element.
* @version 1.0.2
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module array-for-each-x
*/
module.exports = forEach
'use strict';
var toString = Object.prototype.toString
var hasOwnProperty = Object.prototype.hasOwnProperty
var toObject = _dereq_('to-object-x');
var assertIsFunction = _dereq_('assert-is-function-x');
var some = _dereq_('array-some-x');
function forEach(list, iterator, context) {
if (!isFunction(iterator)) {
throw new TypeError('iterator must be a function')
var $forEach = function forEach(array, callBack /* , thisArg */) {
var object = toObject(array);
// If no callback function or if callback is not a callable function
assertIsFunction(callBack);
var wrapped = function _wrapped(item, idx, obj) {
// eslint-disable-next-line no-invalid-this
callBack.call(this, item, idx, obj);
};
var args = [object, wrapped];
if (arguments.length > 2) {
args[2] = arguments[2];
}
some.apply(void 0, args);
};
/**
* This method executes a provided function once for each array element.
*
* @param {array} array - The array to iterate over.
* @param {Function} callBack - Function to execute for each element.
* @param {*} [thisArg] - Value to use as this when executing callback.
* @throws {TypeError} If array is null or undefined.
* @throws {TypeError} If callBack is not a function.
* @example
* var forEach = require('array-for-each-x');
*
* var items = ['item1', 'item2', 'item3'];
* var copy = [];
*
* forEach(items, function(item){
* copy.push(item)
* });
*/
module.exports = $forEach;
},{"array-some-x":3,"assert-is-function-x":4,"to-object-x":29}],3:[function(_dereq_,module,exports){
/**
* @file Tests whether some element passes the provided function.
* @version 1.0.3
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module array-some-x
*/
'use strict';
var tests = {
// Check node 0.6.21 bug where third parameter is not boxed
properlyBoxesNonStrict: true,
properlyBoxesStrict: true
};
var nativeSome = Array.prototype.some;
if (nativeSome) {
try {
nativeSome.call([1], function () {
// eslint-disable-next-line no-invalid-this
tests.properlyBoxesStrict = typeof this === 'string';
}, 'x');
var fn = [
'return nativeSome.call("foo", function (_, __, context) {',
'if (Boolean(context) === false || typeof context !== "object") {',
'tests.properlyBoxesNonStrict = false;}});'
].join('');
// eslint-disable-next-line no-new-func
Function('nativeSome', 'tests', fn)(nativeSome, tests);
} catch (e) {
nativeSome = null;
}
}
var $some;
if (nativeSome && tests.properlyBoxesNonStrict && tests.properlyBoxesStrict) {
$some = function some(array, callBack /* , thisArg */) {
var args = [callBack];
if (arguments.length > 2) {
args.push(arguments[2]);
}
if (arguments.length < 3) {
context = this
return nativeSome.apply(array, args);
};
} else {
// ES5 15.4.4.17
// http://es5.github.com/#x15.4.4.17
// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/some
var toObject = _dereq_('to-object-x');
var assertIsFunction = _dereq_('assert-is-function-x');
var isString = _dereq_('is-string');
var toLength = _dereq_('to-length-x');
var isUndefined = _dereq_('validate.io-undefined');
var splitString = _dereq_('has-boxed-string-x') === false;
$some = function some(array, callBack /* , thisArg */) {
var object = toObject(array);
// If no callback function or if callback is not a callable function
assertIsFunction(callBack);
var iterable = splitString && isString(object) ? object.split('') : object;
var length = toLength(iterable.length);
var thisArg;
if (arguments.length > 2) {
thisArg = arguments[2];
}
if (toString.call(list) === '[object Array]')
forEachArray(list, iterator, context)
else if (typeof list === 'string')
forEachString(list, iterator, context)
else
forEachObject(list, iterator, context)
}
function forEachArray(array, iterator, context) {
for (var i = 0, len = array.length; i < len; i++) {
if (hasOwnProperty.call(array, i)) {
iterator.call(context, array[i], i, array)
for (var i = 0; i < length; i += 1) {
if (i in iterable) {
var result;
if (isUndefined(thisArg)) {
result = callBack(iterable[i], i, object);
} else {
result = callBack.call(thisArg, iterable[i], i, object);
}
if (result) {
return true;
}
}
}
return false;
};
}
function forEachString(string, iterator, context) {
for (var i = 0, len = string.length; i < len; i++) {
// no such thing as a sparse string.
iterator.call(context, string.charAt(i), i, string)
/**
* This method tests whether some element in the array passes the test
* implemented by the provided function.
*
* @param {array} array - The array to iterate over.
* @param {Function} callBack - Function to test for each element.
* @param {*} [thisArg] - Value to use as this when executing callback.
* @throws {TypeError} If array is null or undefined.
* @throws {TypeError} If callBack is not a function.
* @returns {boolean} `true` if the callback function returns a truthy value for
* any array element; otherwise, `false`.
* @example
* var some = require('array-some-x');
*
* function isBiggerThan10(element, index, array) {
* return element > 10;
* }
*
* some([2, 5, 8, 1, 4], isBiggerThan10); // false
* some([12, 5, 8, 1, 4], isBiggerThan10); // true
*/
module.exports = $some;
},{"assert-is-function-x":4,"has-boxed-string-x":7,"is-string":18,"to-length-x":28,"to-object-x":29,"validate.io-undefined":32}],4:[function(_dereq_,module,exports){
/**
* @file If isFunction(callbackfn) is false, throw a TypeError exception.
* @version 1.3.0
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module assert-is-function-x
*/
'use strict';
var isFunction = _dereq_('is-function-x');
var safeToString = _dereq_('safe-to-string-x');
var isPrimitive = _dereq_('is-primitive');
/**
* Tests `callback` to see if it is a function, throws a `TypeError` if it is
* not. Otherwise returns the `callback`.
*
* @param {*} callback - The argument to be tested.
* @throws {TypeError} Throws if `callback` is not a function.
* @returns {*} Returns `callback` if it is function.
* @example
* var assertIsFunction = require('assert-is-function-x');
* var primitive = true;
* var mySymbol = Symbol('mySymbol');
* var symObj = Object(mySymbol);
* var object = {};
* function fn () {}
*
* assertIsFunction(primitive);
* // TypeError 'true is not a function'.
* assertIsFunction(object);
* // TypeError '#<Object> is not a function'.
* assertIsFunction(mySymbol);
* // TypeError 'Symbol(mySymbol) is not a function'.
* assertIsFunction(symObj);
* // TypeError '#<Object> is not a function'.
* assertIsFunction(fn);
* // Returns fn.
*/
module.exports = function assertIsFunction(callback) {
if (!isFunction(callback)) {
var msg = isPrimitive(callback) ? safeToString(callback) : '#<Object>';
throw new TypeError(msg + ' is not a function');
}
return callback;
};
},{"is-function-x":11,"is-primitive":17,"safe-to-string-x":26}],5:[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":6,"object-keys":23}],6:[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');
}
}
function forEachObject(object, iterator, context) {
for (var k in object) {
if (hasOwnProperty.call(object, k)) {
iterator.call(context, object[k], k, object)
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);
}
}
}
};
},{}],7:[function(_dereq_,module,exports){
/**
* @file Check support of by-index access of string characters.
* @version 1.0.0
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module has-boxed-string-x
*/
'use strict';
var boxedString = Object('a');
/**
* Check failure of by-index access of string characters (IE < 9)
* and failure of `0 in boxedString` (Rhino).
*
* `true` if no failure; otherwise `false`.
*
* @type boolean
*/
module.exports = boxedString[0] === 'a' && (0 in boxedString);
},{}],8:[function(_dereq_,module,exports){
/**
* @file Tests if ES6 Symbol is supported.
* @version 1.4.0
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module has-symbol-support-x
*/
'use strict';
/**
* 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';
},{}],9:[function(_dereq_,module,exports){
/**
* @file Tests if ES6 @@toStringTag is supported.
* @see {@link http://www.ecma-international.org/ecma-262/6.0/#sec-@@tostringtag|26.3.1 @@toStringTag}
* @version 1.4.0
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module has-to-string-tag-x
*/
'use strict';
/**
* 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';
},{"has-symbol-support-x":8}],10:[function(_dereq_,module,exports){
/**
* @file ES6-compliant shim for Number.isFinite.
* @see {@link http://www.ecma-international.org/ecma-262/6.0/#sec-number.isfinite|20.1.2.2 Number.isFinite ( number )}
* @version 1.3.0
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module is-finite-x
*/
'use strict';
var $isNaN = _dereq_('is-nan');
var $isFinite;
if (typeof Number.isFinite === 'function') {
var MAX_SAFE_INTEGER = _dereq_('max-safe-integer');
try {
if (Number.isFinite(MAX_SAFE_INTEGER) && Number.isFinite(Infinity) === false) {
$isFinite = Number.isFinite;
}
} catch (ignore) {}
}
},{"is-function":3}],3:[function(_dereq_,module,exports){
module.exports = isFunction
/**
* This method determines whether the passed value is a finite number.
*
* @param {*} number - The value to be tested for finiteness.
* @returns {boolean} A Boolean indicating whether or not the given value is a finite number.
* @example
* var numIsFinite = require('is-finite-x');
*
* numIsFinite(Infinity); // false
* numIsFinite(NaN); // false
* numIsFinite(-Infinity); // false
*
* numIsFinite(0); // true
* numIsFinite(2e64); // true
*
* numIsFinite('0'); // false, would've been true with
* // global isFinite('0')
* numIsFinite(null); // false, would've been true with
*/
module.exports = $isFinite || function isFinite(number) {
return !(typeof number !== 'number' || $isNaN(number) || number === Infinity || number === -Infinity);
};
var toString = Object.prototype.toString
},{"is-nan":13,"max-safe-integer":22}],11:[function(_dereq_,module,exports){
/**
* @file Determine whether a given value is a function object.
* @version 1.4.0
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module is-function-x
*/
function isFunction (fn) {
var string = toString.call(fn)
return string === '[object Function]' ||
(typeof fn === 'function' && string !== '[object RegExp]') ||
(typeof window !== 'undefined' &&
// IE8 and below
(fn === window.setTimeout ||
fn === window.alert ||
fn === window.confirm ||
fn === window.prompt))
'use strict';
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]';
var asyncTag = '[object AsyncFunction]';
var constructorRegex = /^\s*class /;
var isES6ClassFn = function isES6ClassFunc(value) {
try {
var fnStr = fToString.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 (ignore) {}
return false; // not a function
};
},{}],4:[function(_dereq_,module,exports){
/**
* Checks if `value` is classified as a `Function` object.
*
* @private
* @param {*} value - The value to check.
* @returns {boolean} Returns `true` if `value` is correctly classified,
* else `false`.
*/
var tryFuncToString = function funcToString(value) {
try {
if (isES6ClassFn(value)) {
return false;
}
fToString.call(value);
return true;
} catch (ignore) {}
return false;
};
/**
* Checks if `value` is classified as a `Function` object.
*
* @param {*} value - The value to check.
* @returns {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(async function test3() {}); // true
* isFunction(class Test {}); // false
* isFunction((x, y) => {return this;}); // true
*/
module.exports = function isFunction(value) {
if (isPrimitive(value)) {
return false;
}
if (hasToStringTag) {
return tryFuncToString(value);
}
if (isES6ClassFn(value)) {
return false;
}
var strTag = toStringTag(value);
return strTag === funcTag || strTag === genTag || strTag === asyncTag;
};
},{"has-to-string-tag-x":9,"is-primitive":17,"to-string-tag-x":30}],12:[function(_dereq_,module,exports){
'use strict';
/* http://www.ecma-international.org/ecma-262/6.0/#sec-number.isnan */
module.exports = function isNaN(value) {
return value !== value;
};
},{}],13:[function(_dereq_,module,exports){
'use strict';
var define = _dereq_('define-properties');
var implementation = _dereq_('./implementation');
var getPolyfill = _dereq_('./polyfill');
var shim = _dereq_('./shim');
/* http://www.ecma-international.org/ecma-262/6.0/#sec-number.isnan */
define(implementation, {
getPolyfill: getPolyfill,
implementation: implementation,
shim: shim
});
module.exports = implementation;
},{"./implementation":12,"./polyfill":14,"./shim":15,"define-properties":5}],14:[function(_dereq_,module,exports){
'use strict';
var implementation = _dereq_('./implementation');
module.exports = function getPolyfill() {
if (Number.isNaN && Number.isNaN(NaN) && !Number.isNaN('a')) {
return Number.isNaN;
}
return implementation;
};
},{"./implementation":12}],15:[function(_dereq_,module,exports){
'use strict';
var define = _dereq_('define-properties');
var getPolyfill = _dereq_('./polyfill');
/* http://www.ecma-international.org/ecma-262/6.0/#sec-number.isnan */
module.exports = function shimNumberIsNaN() {
var polyfill = getPolyfill();
define(Number, { isNaN: polyfill }, { isNaN: function () { return Number.isNaN !== polyfill; } });
return polyfill;
};
},{"./polyfill":14,"define-properties":5}],16:[function(_dereq_,module,exports){
/**
* @file Checks if `value` is `null` or `undefined`.
* @version 1.4.0
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module is-nil-x
*/
'use strict';
var isUndefined = _dereq_('validate.io-undefined');
var isNull = _dereq_('lodash.isnull');
/**
* Checks if `value` is `null` or `undefined`.
*
* @param {*} value - The value to check.
* @returns {boolean} Returns `true` if `value` is nullish, else `false`.
* @example
* var isNil = require('is-nil-x');
*
* isNil(null); // => true
* isNil(void 0); // => true
* isNil(NaN); // => false
*/
module.exports = function isNil(value) {
return isNull(value) || isUndefined(value);
};
},{"lodash.isnull":20,"validate.io-undefined":32}],17:[function(_dereq_,module,exports){
/*!
* is-primitive <https://github.com/jonschlinkert/is-primitive>
*
* Copyright (c) 2014-2015, Jon Schlinkert.
* Licensed under the MIT License.
*/
'use strict';
// see http://jsperf.com/testing-value-is-primitive/7
module.exports = function isPrimitive(value) {
return value == null || (typeof value !== 'function' && typeof value !== 'object');
};
},{}],18:[function(_dereq_,module,exports){
'use strict';
var strValue = String.prototype.valueOf;
var tryStringObject = function tryStringObject(value) {
try {
strValue.call(value);
return true;
} catch (e) {
return false;
}
};
var toStr = Object.prototype.toString;
var strClass = '[object String]';
var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
module.exports = function isString(value) {
if (typeof value === 'string') { return true; }
if (typeof value !== 'object') { return false; }
return hasToStringTag ? tryStringObject(value) : toStr.call(value) === strClass;
};
},{}],19:[function(_dereq_,module,exports){
'use strict';
var toStr = Object.prototype.toString;
var hasSymbols = typeof Symbol === 'function' && typeof Symbol() === 'symbol';

@@ -125,4 +685,492 @@

},{}],5:[function(_dereq_,module,exports){
},{}],20:[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>
*/
/**
* 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;
}
module.exports = isNull;
},{}],21:[function(_dereq_,module,exports){
/**
* @file ES6-compliant shim for Math.sign.
* @see {@link http://www.ecma-international.org/ecma-262/6.0/#sec-math.sign|20.2.2.29 Math.sign(x)}
* @version 1.3.0
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module math-sign-x
*/
'use strict';
var $isNaN = _dereq_('is-nan');
var $sign;
if (typeof Math.sign === 'function') {
try {
if (Math.sign(10) === 1 && Math.sign(-10) === -1 && Math.sign(0) === 0) {
$sign = Math.sign;
}
} catch (ignore) {}
}
/**
* This method returns the sign of a number, indicating whether the number is positive,
* negative or zero.
*
* @param {*} x - A number.
* @returns {number} A number representing the sign of the given argument. If the argument
* is a positive number, negative number, positive zero or negative zero, the function will
* return 1, -1, 0 or -0 respectively. Otherwise, NaN is returned.
* @example
* var mathSign = require('math-sign-x');
*
* mathSign(3); // 1
* mathSign(-3); // -1
* mathSign('-3'); // -1
* mathSign(0); // 0
* mathSign(-0); // -0
* mathSign(NaN); // NaN
* mathSign('foo'); // NaN
* mathSign(); // NaN
*/
module.exports = $sign || function sign(x) {
var n = Number(x);
if (n === 0 || $isNaN(n)) {
return n;
}
return n > 0 ? 1 : -1;
};
},{"is-nan":13}],22:[function(_dereq_,module,exports){
'use strict';
module.exports = 9007199254740991;
},{}],23:[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 isEnumerable = Object.prototype.propertyIsEnumerable;
var hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');
var hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');
var dontEnums = [
'toString',
'toLocaleString',
'valueOf',
'hasOwnProperty',
'isPrototypeOf',
'propertyIsEnumerable',
'constructor'
];
var equalsConstructorPrototype = function (o) {
var ctor = o.constructor;
return ctor && ctor.prototype === o;
};
var excludedKeys = {
$console: true,
$external: true,
$frame: true,
$frameElement: true,
$frames: true,
$innerHeight: true,
$innerWidth: true,
$outerHeight: true,
$outerWidth: true,
$pageXOffset: true,
$pageYOffset: true,
$parent: true,
$scrollLeft: true,
$scrollTop: true,
$scrollX: true,
$scrollY: 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 (!excludedKeys['$' + 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;
}());
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 = [];
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":24}],24:[function(_dereq_,module,exports){
'use strict';
var toStr = Object.prototype.toString;
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;
};
},{}],25:[function(_dereq_,module,exports){
/**
* @file ES6-compliant shim for RequireObjectCoercible.
* @see {@link http://www.ecma-international.org/ecma-262/6.0/#sec-requireobjectcoercible|7.2.1 RequireObjectCoercible ( argument )}
* @version 1.4.0
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module require-object-coercible-x
*/
'use strict';
var isNil = _dereq_('is-nil-x');
/**
* The abstract operation RequireObjectCoercible throws an error if argument
* is a value that cannot be converted to an Object using ToObject.
*
* @param {*} value - The `value` to check.
* @throws {TypeError} If `value` is a `null` or `undefined`.
* @returns {string} The `value`.
* @example
* var RequireObjectCoercible = require('require-object-coercible-x');
*
* RequireObjectCoercible(); // TypeError
* RequireObjectCoercible(null); // TypeError
* RequireObjectCoercible('abc'); // 'abc'
* RequireObjectCoercible(true); // true
* RequireObjectCoercible(Symbol('foo')); // Symbol('foo')
*/
module.exports = function RequireObjectCoercible(value) {
if (isNil(value)) {
throw new TypeError('Cannot call method on ' + value);
}
return value;
};
},{"is-nil-x":16}],26:[function(_dereq_,module,exports){
/**
* @file Like ES6 ToString but handles Symbols too.
* @see {@link https://github.com/Xotic750/to-string-x|to-string-x}
* @version 1.5.0
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module safe-to-string-x
*/
'use strict';
var isSymbol = _dereq_('is-symbol');
var pToString = _dereq_('has-symbol-support-x') && Symbol.prototype.toString;
/**
* The abstract operation `safeToString` converts a `Symbol` literal or
* object to `Symbol()` instead of throwing a `TypeError`.
*
* @param {*} value - The value to convert to a string.
* @returns {string} The converted value.
* @example
* var safeToString = require('safe-to-string-x');
*
* safeToString(); // 'undefined'
* safeToString(null); // 'null'
* safeToString('abc'); // 'abc'
* safeToString(true); // 'true'
* safeToString(Symbol('foo')); // 'Symbol(foo)'
* safeToString(Symbol.iterator); // 'Symbol(Symbol.iterator)'
* safeToString(Object(Symbol.iterator)); // 'Symbol(Symbol.iterator)'
*/
module.exports = function safeToString(value) {
return pToString && isSymbol(value) ? pToString.call(value) : String(value);
};
},{"has-symbol-support-x":8,"is-symbol":19}],27:[function(_dereq_,module,exports){
/**
* @file ToInteger converts 'argument' to an integral numeric value.
* @see {@link http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger|7.1.4 ToInteger ( argument )}
* @version 1.4.0
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module to-integer-x
*/
'use strict';
var $isNaN = _dereq_('is-nan');
var $isFinite = _dereq_('is-finite-x');
var $sign = _dereq_('math-sign-x');
/**
* Converts `value` to an integer.
*
* @param {*} value - The value to convert.
* @returns {number} Returns the converted integer.
*
* @example
* var toInteger = require('to-integer-x');
* toInteger(3); // 3
* toInteger(Number.MIN_VALUE); // 0
* toInteger(Infinity); // 1.7976931348623157e+308
* toInteger('3'); // 3
*/
module.exports = function ToInteger(value) {
var number = Number(value);
if ($isNaN(number)) {
return 0;
}
if (number === 0 || $isFinite(number) === false) {
return number;
}
return $sign(number) * Math.floor(Math.abs(number));
};
},{"is-finite-x":10,"is-nan":13,"math-sign-x":21}],28:[function(_dereq_,module,exports){
/**
* @file ES6-compliant shim for ToLength.
* @see {@link http://www.ecma-international.org/ecma-262/6.0/#sec-tolength|7.1.15 ToLength ( argument )}
* @version 1.4.0
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module to-length-x
*/
'use strict';
var toInteger = _dereq_('to-integer-x');
var MAX_SAFE_INTEGER = _dereq_('max-safe-integer');
/**
* Converts `value` to an integer suitable for use as the length of an
* array-like object.
*
* @param {*} value - The value to convert.
* @returns {number} Returns the converted integer.
* @example
* var toLength = require('to-length-x');
* toLength(3); // 3
* toLength(Number.MIN_VALUE); // 0
* toLength(Infinity); // Number.MAX_SAFE_INTEGER
* toLength('3'); // 3
*/
module.exports = function ToLength(value) {
var len = toInteger(value);
// includes converting -0 to +0
if (len <= 0) {
return 0;
}
if (len > MAX_SAFE_INTEGER) {
return MAX_SAFE_INTEGER;
}
return len;
};
},{"max-safe-integer":22,"to-integer-x":27}],29:[function(_dereq_,module,exports){
/**
* @file ES6-compliant shim for ToObject.
* @see {@link http://www.ecma-international.org/ecma-262/6.0/#sec-toobject|7.1.13 ToObject ( argument )}
* @version 1.4.0
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module to-object-x
*/
'use strict';
var $requireObjectCoercible = _dereq_('require-object-coercible-x');
/**
* The abstract operation ToObject converts argument to a value of
* type Object.
*
* @param {*} value - The `value` to convert.
* @throws {TypeError} If `value` is a `null` or `undefined`.
* @returns {!Object} The `value` converted to an object.
* @example
* var ToObject = require('to-object-x');
*
* ToObject(); // TypeError
* ToObject(null); // TypeError
* ToObject('abc'); // Object('abc')
* ToObject(true); // Object(true)
* ToObject(Symbol('foo')); // Object(Symbol('foo'))
*/
module.exports = function ToObject(value) {
return Object($requireObjectCoercible(value));
};
},{"require-object-coercible-x":25}],30:[function(_dereq_,module,exports){
/**
* @file Get an object's ES6 @@toStringTag.
* @see {@link http://www.ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring|19.1.3.6 Object.prototype.toString ( )}
* @version 1.4.0
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module to-string-tag-x
*/
'use strict';
var isNull = _dereq_('lodash.isnull');
var isUndefined = _dereq_('validate.io-undefined');
var toStr = Object.prototype.toString;
/**
* The `toStringTag` method returns "[object type]", where type is the
* object type.
*
* @param {*} value - The object of which to get the object type string.
* @returns {string} The object type string.
* @example
* var toStringTag = require('to-string-tag-x');
*
* var o = new Object();
* toStringTag(o); // returns '[object Object]'
*/
module.exports = function toStringTag(value) {
if (isNull(value)) {
return '[object Null]';
}
if (isUndefined(value)) {
return '[object Undefined]';
}
return toStr.call(value);
};
},{"lodash.isnull":20,"validate.io-undefined":32}],31:[function(_dereq_,module,exports){
/**
* @file ES6-compliant shim for ToString.

@@ -166,6 +1214,53 @@ * @see {@link http://www.ecma-international.org/ecma-262/6.0/#sec-tostring|7.1.12 ToString ( argument )}

},{"is-symbol":4}],6:[function(_dereq_,module,exports){
},{"is-symbol":19}],32:[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.
*
*/
'use strict';
/**
* 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()
// EXPORTS //
module.exports = isUndefined;
},{}],33:[function(_dereq_,module,exports){
/**
* @file List of ECMAScript5 white space characters.
* @version 2.0.0
* @version 2.0.1
* @author Xotic750 <Xotic750@gmail.com>

@@ -179,3 +1274,3 @@ * @copyright Xotic750

var forEach = _dereq_('for-each');
var forEach = _dereq_('array-for-each-x');

@@ -389,3 +1484,3 @@ /**

},{"for-each":2}]},{},[1])(1)
},{"array-for-each-x":2}]},{},[1])(1)
});
!function(f){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=f();else if("function"==typeof define&&define.amd)define([],f);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).returnExports=f()}}(function(){return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&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||e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o<r.length;o++)s(r[o]);return s}({1:[function(_dereq_,module,exports){/**
* @file This method removes whitespace from the left end of a string.
* @version 1.3.0
* @version 1.3.1
* @author Xotic750 <Xotic750@gmail.com>

@@ -9,3 +9,140 @@ * @copyright Xotic750

*/
"use strict";var $toString=_dereq_("to-string-x"),reLeft=new RegExp("^["+_dereq_("white-space-x").string+"]+");module.exports=function trimLeft(string){return $toString(string).replace(reLeft,"")}},{"to-string-x":5,"white-space-x":6}],2:[function(_dereq_,module,exports){function forEachArray(array,iterator,context){for(var i=0,len=array.length;i<len;i++)hasOwnProperty.call(array,i)&&iterator.call(context,array[i],i,array)}function forEachString(string,iterator,context){for(var i=0,len=string.length;i<len;i++)iterator.call(context,string.charAt(i),i,string)}function forEachObject(object,iterator,context){for(var k in object)hasOwnProperty.call(object,k)&&iterator.call(context,object[k],k,object)}var isFunction=_dereq_("is-function");module.exports=function forEach(list,iterator,context){if(!isFunction(iterator))throw new TypeError("iterator must be a function");arguments.length<3&&(context=this),"[object Array]"===toString.call(list)?forEachArray(list,iterator,context):"string"==typeof list?forEachString(list,iterator,context):forEachObject(list,iterator,context)};var toString=Object.prototype.toString,hasOwnProperty=Object.prototype.hasOwnProperty},{"is-function":3}],3:[function(_dereq_,module,exports){module.exports=function isFunction(fn){var string=toString.call(fn);return"[object Function]"===string||"function"==typeof fn&&"[object RegExp]"!==string||"undefined"!=typeof window&&(fn===window.setTimeout||fn===window.alert||fn===window.confirm||fn===window.prompt)};var toString=Object.prototype.toString},{}],4:[function(_dereq_,module,exports){"use strict";var toStr=Object.prototype.toString;if("function"==typeof Symbol&&"symbol"==typeof Symbol()){var symToStr=Symbol.prototype.toString,symStringRegex=/^Symbol\(.*\)$/,isSymbolObject=function isSymbolObject(value){return"symbol"==typeof value.valueOf()&&symStringRegex.test(symToStr.call(value))};module.exports=function isSymbol(value){if("symbol"==typeof value)return!0;if("[object Symbol]"!==toStr.call(value))return!1;try{return isSymbolObject(value)}catch(e){return!1}}}else module.exports=function isSymbol(value){return!1}},{}],5:[function(_dereq_,module,exports){/**
"use strict";var $toString=_dereq_("to-string-x"),reLeft=new RegExp("^["+_dereq_("white-space-x").string+"]+");module.exports=function trimLeft(string){return $toString(string).replace(reLeft,"")}},{"to-string-x":31,"white-space-x":33}],2:[function(_dereq_,module,exports){/**
* @file Executes a provided function once for each array element.
* @version 1.0.2
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module array-for-each-x
*/
"use strict";var toObject=_dereq_("to-object-x"),assertIsFunction=_dereq_("assert-is-function-x"),some=_dereq_("array-some-x");module.exports=function forEach(array,callBack){var object=toObject(array);assertIsFunction(callBack);var args=[object,function _wrapped(item,idx,obj){callBack.call(this,item,idx,obj)}];arguments.length>2&&(args[2]=arguments[2]),some.apply(void 0,args)}},{"array-some-x":3,"assert-is-function-x":4,"to-object-x":29}],3:[function(_dereq_,module,exports){/**
* @file Tests whether some element passes the provided function.
* @version 1.0.3
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module array-some-x
*/
"use strict";var tests={properlyBoxesNonStrict:!0,properlyBoxesStrict:!0},nativeSome=Array.prototype.some;if(nativeSome)try{nativeSome.call([1],function(){tests.properlyBoxesStrict="string"==typeof this},"x");var fn=['return nativeSome.call("foo", function (_, __, context) {','if (Boolean(context) === false || typeof context !== "object") {',"tests.properlyBoxesNonStrict = false;}});"].join("");Function("nativeSome","tests",fn)(nativeSome,tests)}catch(e){nativeSome=null}var $some;if(nativeSome&&tests.properlyBoxesNonStrict&&tests.properlyBoxesStrict)$some=function some(array,callBack){var args=[callBack];return arguments.length>2&&args.push(arguments[2]),nativeSome.apply(array,args)};else{var toObject=_dereq_("to-object-x"),assertIsFunction=_dereq_("assert-is-function-x"),isString=_dereq_("is-string"),toLength=_dereq_("to-length-x"),isUndefined=_dereq_("validate.io-undefined"),splitString=!1===_dereq_("has-boxed-string-x");$some=function some(array,callBack){var object=toObject(array);assertIsFunction(callBack);var thisArg,iterable=splitString&&isString(object)?object.split(""):object,length=toLength(iterable.length);arguments.length>2&&(thisArg=arguments[2]);for(var i=0;i<length;i+=1)if(i in iterable){if(isUndefined(thisArg)?callBack(iterable[i],i,object):callBack.call(thisArg,iterable[i],i,object))return!0}return!1}}module.exports=$some},{"assert-is-function-x":4,"has-boxed-string-x":7,"is-string":18,"to-length-x":28,"to-object-x":29,"validate.io-undefined":32}],4:[function(_dereq_,module,exports){/**
* @file If isFunction(callbackfn) is false, throw a TypeError exception.
* @version 1.3.0
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module assert-is-function-x
*/
"use strict";var isFunction=_dereq_("is-function-x"),safeToString=_dereq_("safe-to-string-x"),isPrimitive=_dereq_("is-primitive");module.exports=function assertIsFunction(callback){if(!isFunction(callback)){var msg=isPrimitive(callback)?safeToString(callback):"#<Object>";throw new TypeError(msg+" is not a function")}return callback}},{"is-function-x":11,"is-primitive":17,"safe-to-string-x":26}],5:[function(_dereq_,module,exports){"use strict";var keys=_dereq_("object-keys"),foreach=_dereq_("foreach"),hasSymbols="function"==typeof Symbol&&"symbol"==typeof Symbol(),toStr=Object.prototype.toString,isFunction=function(fn){return"function"==typeof fn&&"[object Function]"===toStr.call(fn)},supportsDescriptors=Object.defineProperty&&function(){var obj={};try{Object.defineProperty(obj,"x",{enumerable:!1,value:obj});for(var _ in obj)return!1;return obj.x===obj}catch(e){return!1}}(),defineProperty=function(object,name,value,predicate){(!(name in object)||isFunction(predicate)&&predicate())&&(supportsDescriptors?Object.defineProperty(object,name,{configurable:!0,enumerable:!1,value:value,writable:!0}):object[name]=value)},defineProperties=function(object,map){var predicates=arguments.length>2?arguments[2]:{},props=keys(map);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:6,"object-keys":23}],6:[function(_dereq_,module,exports){var hasOwn=Object.prototype.hasOwnProperty,toString=Object.prototype.toString;module.exports=function forEach(obj,fn,ctx){if("[object Function]"!==toString.call(fn))throw new TypeError("iterator must be a function");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)hasOwn.call(obj,k)&&fn.call(ctx,obj[k],k,obj)}},{}],7:[function(_dereq_,module,exports){/**
* @file Check support of by-index access of string characters.
* @version 1.0.0
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module has-boxed-string-x
*/
"use strict";var boxedString=Object("a");module.exports="a"===boxedString[0]&&0 in boxedString},{}],8:[function(_dereq_,module,exports){/**
* @file Tests if ES6 Symbol is supported.
* @version 1.4.0
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module has-symbol-support-x
*/
"use strict";module.exports="function"==typeof Symbol&&"symbol"==typeof Symbol("")},{}],9:[function(_dereq_,module,exports){/**
* @file Tests if ES6 @@toStringTag is supported.
* @see {@link http://www.ecma-international.org/ecma-262/6.0/#sec-@@tostringtag|26.3.1 @@toStringTag}
* @version 1.4.0
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module has-to-string-tag-x
*/
"use strict";module.exports=_dereq_("has-symbol-support-x")&&"symbol"==typeof Symbol.toStringTag},{"has-symbol-support-x":8}],10:[function(_dereq_,module,exports){/**
* @file ES6-compliant shim for Number.isFinite.
* @see {@link http://www.ecma-international.org/ecma-262/6.0/#sec-number.isfinite|20.1.2.2 Number.isFinite ( number )}
* @version 1.3.0
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module is-finite-x
*/
"use strict";var $isFinite,$isNaN=_dereq_("is-nan");if("function"==typeof Number.isFinite){var MAX_SAFE_INTEGER=_dereq_("max-safe-integer");try{Number.isFinite(MAX_SAFE_INTEGER)&&!1===Number.isFinite(Infinity)&&($isFinite=Number.isFinite)}catch(ignore){}}module.exports=$isFinite||function isFinite(number){return!("number"!=typeof number||$isNaN(number)||number===Infinity||number===-Infinity)}},{"is-nan":13,"max-safe-integer":22}],11:[function(_dereq_,module,exports){/**
* @file Determine whether a given value is a function object.
* @version 1.4.0
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module is-function-x
*/
"use strict";var fToString=Function.prototype.toString,toStringTag=_dereq_("to-string-tag-x"),hasToStringTag=_dereq_("has-to-string-tag-x"),isPrimitive=_dereq_("is-primitive"),constructorRegex=/^\s*class /,isES6ClassFn=function isES6ClassFunc(value){try{var spaceStripped=fToString.call(value).replace(/\/\/.*\n/g,"").replace(/\/\*[.\s\S]*\*\//g,"").replace(/\n/gm," ").replace(/ {2}/g," ");return constructorRegex.test(spaceStripped)}catch(ignore){}return!1},tryFuncToString=function funcToString(value){try{return!isES6ClassFn(value)&&(fToString.call(value),!0)}catch(ignore){}return!1};module.exports=function isFunction(value){if(isPrimitive(value))return!1;if(hasToStringTag)return tryFuncToString(value);if(isES6ClassFn(value))return!1;var strTag=toStringTag(value);return"[object Function]"===strTag||"[object GeneratorFunction]"===strTag||"[object AsyncFunction]"===strTag}},{"has-to-string-tag-x":9,"is-primitive":17,"to-string-tag-x":30}],12:[function(_dereq_,module,exports){"use strict";module.exports=function isNaN(value){return value!==value}},{}],13:[function(_dereq_,module,exports){"use strict";var define=_dereq_("define-properties"),implementation=_dereq_("./implementation");define(implementation,{getPolyfill:_dereq_("./polyfill"),implementation:implementation,shim:_dereq_("./shim")}),module.exports=implementation},{"./implementation":12,"./polyfill":14,"./shim":15,"define-properties":5}],14:[function(_dereq_,module,exports){"use strict";var implementation=_dereq_("./implementation");module.exports=function getPolyfill(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:implementation}},{"./implementation":12}],15:[function(_dereq_,module,exports){"use strict";var define=_dereq_("define-properties"),getPolyfill=_dereq_("./polyfill");module.exports=function shimNumberIsNaN(){var polyfill=getPolyfill();return define(Number,{isNaN:polyfill},{isNaN:function(){return Number.isNaN!==polyfill}}),polyfill}},{"./polyfill":14,"define-properties":5}],16:[function(_dereq_,module,exports){/**
* @file Checks if `value` is `null` or `undefined`.
* @version 1.4.0
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module is-nil-x
*/
"use strict";var isUndefined=_dereq_("validate.io-undefined"),isNull=_dereq_("lodash.isnull");module.exports=function isNil(value){return isNull(value)||isUndefined(value)}},{"lodash.isnull":20,"validate.io-undefined":32}],17:[function(_dereq_,module,exports){"use strict";module.exports=function isPrimitive(value){return null==value||"function"!=typeof value&&"object"!=typeof value}},{}],18:[function(_dereq_,module,exports){"use strict";var strValue=String.prototype.valueOf,tryStringObject=function tryStringObject(value){try{return strValue.call(value),!0}catch(e){return!1}},toStr=Object.prototype.toString,hasToStringTag="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;module.exports=function isString(value){return"string"==typeof value||"object"==typeof value&&(hasToStringTag?tryStringObject(value):"[object String]"===toStr.call(value))}},{}],19:[function(_dereq_,module,exports){"use strict";var toStr=Object.prototype.toString;if("function"==typeof Symbol&&"symbol"==typeof Symbol()){var symToStr=Symbol.prototype.toString,symStringRegex=/^Symbol\(.*\)$/,isSymbolObject=function isSymbolObject(value){return"symbol"==typeof value.valueOf()&&symStringRegex.test(symToStr.call(value))};module.exports=function isSymbol(value){if("symbol"==typeof value)return!0;if("[object Symbol]"!==toStr.call(value))return!1;try{return isSymbolObject(value)}catch(e){return!1}}}else module.exports=function isSymbol(value){return!1}},{}],20:[function(_dereq_,module,exports){module.exports=function isNull(value){return null===value}},{}],21:[function(_dereq_,module,exports){/**
* @file ES6-compliant shim for Math.sign.
* @see {@link http://www.ecma-international.org/ecma-262/6.0/#sec-math.sign|20.2.2.29 Math.sign(x)}
* @version 1.3.0
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module math-sign-x
*/
"use strict";var $sign,$isNaN=_dereq_("is-nan");if("function"==typeof Math.sign)try{1===Math.sign(10)&&-1===Math.sign(-10)&&0===Math.sign(0)&&($sign=Math.sign)}catch(ignore){}module.exports=$sign||function sign(x){var n=Number(x);return 0===n||$isNaN(n)?n:n>0?1:-1}},{"is-nan":13}],22:[function(_dereq_,module,exports){"use strict";module.exports=9007199254740991},{}],23:[function(_dereq_,module,exports){"use strict";var has=Object.prototype.hasOwnProperty,toStr=Object.prototype.toString,slice=Array.prototype.slice,isArgs=_dereq_("./isArguments"),isEnumerable=Object.prototype.propertyIsEnumerable,hasDontEnumBug=!isEnumerable.call({toString:null},"toString"),hasProtoEnumBug=isEnumerable.call(function(){},"prototype"),dontEnums=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],equalsConstructorPrototype=function(o){var ctor=o.constructor;return ctor&&ctor.prototype===o},excludedKeys={$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},hasAutomationEqualityBug=function(){if("undefined"==typeof window)return!1;for(var k in window)try{if(!excludedKeys["$"+k]&&has.call(window,k)&&null!==window[k]&&"object"==typeof window[k])try{equalsConstructorPrototype(window[k])}catch(e){return!0}}catch(e){return!0}return!1}(),equalsConstructorPrototypeIfNotBuggy=function(o){if("undefined"==typeof window||!hasAutomationEqualityBug)return equalsConstructorPrototype(o);try{return equalsConstructorPrototype(o)}catch(e){return!1}},keysShim=function keys(object){var isObject=null!==object&&"object"==typeof object,isFunction="[object Function]"===toStr.call(object),isArguments=isArgs(object),isString=isObject&&"[object String]"===toStr.call(object),theKeys=[];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)skipProto&&"prototype"===name||!has.call(object,name)||theKeys.push(String(name));if(hasDontEnumBug)for(var skipConstructor=equalsConstructorPrototypeIfNotBuggy(object),k=0;k<dontEnums.length;++k)skipConstructor&&"constructor"===dontEnums[k]||!has.call(object,dontEnums[k])||theKeys.push(dontEnums[k]);return theKeys};keysShim.shim=function shimObjectKeys(){if(Object.keys){if(!function(){return 2===(Object.keys(arguments)||"").length}(1,2)){var originalKeys=Object.keys;Object.keys=function keys(object){return originalKeys(isArgs(object)?slice.call(object):object)}}}else Object.keys=keysShim;return Object.keys||keysShim},module.exports=keysShim},{"./isArguments":24}],24:[function(_dereq_,module,exports){"use strict";var toStr=Object.prototype.toString;module.exports=function isArguments(value){var str=toStr.call(value),isArgs="[object Arguments]"===str;return isArgs||(isArgs="[object Array]"!==str&&null!==value&&"object"==typeof value&&"number"==typeof value.length&&value.length>=0&&"[object Function]"===toStr.call(value.callee)),isArgs}},{}],25:[function(_dereq_,module,exports){/**
* @file ES6-compliant shim for RequireObjectCoercible.
* @see {@link http://www.ecma-international.org/ecma-262/6.0/#sec-requireobjectcoercible|7.2.1 RequireObjectCoercible ( argument )}
* @version 1.4.0
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module require-object-coercible-x
*/
"use strict";var isNil=_dereq_("is-nil-x");module.exports=function RequireObjectCoercible(value){if(isNil(value))throw new TypeError("Cannot call method on "+value);return value}},{"is-nil-x":16}],26:[function(_dereq_,module,exports){/**
* @file Like ES6 ToString but handles Symbols too.
* @see {@link https://github.com/Xotic750/to-string-x|to-string-x}
* @version 1.5.0
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module safe-to-string-x
*/
"use strict";var isSymbol=_dereq_("is-symbol"),pToString=_dereq_("has-symbol-support-x")&&Symbol.prototype.toString;module.exports=function safeToString(value){return pToString&&isSymbol(value)?pToString.call(value):String(value)}},{"has-symbol-support-x":8,"is-symbol":19}],27:[function(_dereq_,module,exports){/**
* @file ToInteger converts 'argument' to an integral numeric value.
* @see {@link http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger|7.1.4 ToInteger ( argument )}
* @version 1.4.0
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module to-integer-x
*/
"use strict";var $isNaN=_dereq_("is-nan"),$isFinite=_dereq_("is-finite-x"),$sign=_dereq_("math-sign-x");module.exports=function ToInteger(value){var number=Number(value);return $isNaN(number)?0:0===number||!1===$isFinite(number)?number:$sign(number)*Math.floor(Math.abs(number))}},{"is-finite-x":10,"is-nan":13,"math-sign-x":21}],28:[function(_dereq_,module,exports){/**
* @file ES6-compliant shim for ToLength.
* @see {@link http://www.ecma-international.org/ecma-262/6.0/#sec-tolength|7.1.15 ToLength ( argument )}
* @version 1.4.0
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module to-length-x
*/
"use strict";var toInteger=_dereq_("to-integer-x"),MAX_SAFE_INTEGER=_dereq_("max-safe-integer");module.exports=function ToLength(value){var len=toInteger(value);return len<=0?0:len>MAX_SAFE_INTEGER?MAX_SAFE_INTEGER:len}},{"max-safe-integer":22,"to-integer-x":27}],29:[function(_dereq_,module,exports){/**
* @file ES6-compliant shim for ToObject.
* @see {@link http://www.ecma-international.org/ecma-262/6.0/#sec-toobject|7.1.13 ToObject ( argument )}
* @version 1.4.0
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module to-object-x
*/
"use strict";var $requireObjectCoercible=_dereq_("require-object-coercible-x");module.exports=function ToObject(value){return Object($requireObjectCoercible(value))}},{"require-object-coercible-x":25}],30:[function(_dereq_,module,exports){/**
* @file Get an object's ES6 @@toStringTag.
* @see {@link http://www.ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring|19.1.3.6 Object.prototype.toString ( )}
* @version 1.4.0
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module to-string-tag-x
*/
"use strict";var isNull=_dereq_("lodash.isnull"),isUndefined=_dereq_("validate.io-undefined"),toStr=Object.prototype.toString;module.exports=function toStringTag(value){return isNull(value)?"[object Null]":isUndefined(value)?"[object Undefined]":toStr.call(value)}},{"lodash.isnull":20,"validate.io-undefined":32}],31:[function(_dereq_,module,exports){/**
* @file ES6-compliant shim for ToString.

@@ -19,5 +156,5 @@ * @see {@link http://www.ecma-international.org/ecma-262/6.0/#sec-tostring|7.1.12 ToString ( argument )}

*/
"use strict";var isSymbol=_dereq_("is-symbol");module.exports=function ToString(value){if(isSymbol(value))throw new TypeError("Cannot convert a Symbol value to a string");return String(value)}},{"is-symbol":4}],6:[function(_dereq_,module,exports){/**
"use strict";var isSymbol=_dereq_("is-symbol");module.exports=function ToString(value){if(isSymbol(value))throw new TypeError("Cannot convert a Symbol value to a string");return String(value)}},{"is-symbol":19}],32:[function(_dereq_,module,exports){"use strict";module.exports=function isUndefined(value){return void 0===value}},{}],33:[function(_dereq_,module,exports){/**
* @file List of ECMAScript5 white space characters.
* @version 2.0.0
* @version 2.0.1
* @author Xotic750 <Xotic750@gmail.com>

@@ -28,2 +165,2 @@ * @copyright Xotic750

*/
"use strict";var list=[{code:9,description:"Tab",string:"\t"},{code:10,description:"Line Feed",string:"\n"},{code:11,description:"Vertical Tab",string:"\x0B"},{code:12,description:"Form Feed",string:"\f"},{code:13,description:"Carriage Return",string:"\r"},{code:32,description:"Space",string:" "},{code:160,description:"No-break space",string:"\xa0"},{code:5760,description:"Ogham space mark",string:"\u1680"},{code:6158,description:"Mongolian vowel separator",string:"\u180e"},{code:8192,description:"En quad",string:"\u2000"},{code:8193,description:"Em quad",string:"\u2001"},{code:8194,description:"En space",string:"\u2002"},{code:8195,description:"Em space",string:"\u2003"},{code:8196,description:"Three-per-em space",string:"\u2004"},{code:8197,description:"Four-per-em space",string:"\u2005"},{code:8198,description:"Six-per-em space",string:"\u2006"},{code:8199,description:"Figure space",string:"\u2007"},{code:8200,description:"Punctuation space",string:"\u2008"},{code:8201,description:"Thin space",string:"\u2009"},{code:8202,description:"Hair space",string:"\u200a"},{code:8232,description:"Line separator",string:"\u2028"},{code:8233,description:"Paragraph separator",string:"\u2029"},{code:8239,description:"Narrow no-break space",string:"\u202f"},{code:8287,description:"Medium mathematical space",string:"\u205f"},{code:12288,description:"Ideographic space",string:"\u3000"},{code:65279,description:"Byte Order Mark",string:"\ufeff"}],string="";_dereq_("for-each")(list,function reducer(item){string+=item.string}),module.exports={list:list,string:string}},{"for-each":2}]},{},[1])(1)});
"use strict";var list=[{code:9,description:"Tab",string:"\t"},{code:10,description:"Line Feed",string:"\n"},{code:11,description:"Vertical Tab",string:"\x0B"},{code:12,description:"Form Feed",string:"\f"},{code:13,description:"Carriage Return",string:"\r"},{code:32,description:"Space",string:" "},{code:160,description:"No-break space",string:"\xa0"},{code:5760,description:"Ogham space mark",string:"\u1680"},{code:6158,description:"Mongolian vowel separator",string:"\u180e"},{code:8192,description:"En quad",string:"\u2000"},{code:8193,description:"Em quad",string:"\u2001"},{code:8194,description:"En space",string:"\u2002"},{code:8195,description:"Em space",string:"\u2003"},{code:8196,description:"Three-per-em space",string:"\u2004"},{code:8197,description:"Four-per-em space",string:"\u2005"},{code:8198,description:"Six-per-em space",string:"\u2006"},{code:8199,description:"Figure space",string:"\u2007"},{code:8200,description:"Punctuation space",string:"\u2008"},{code:8201,description:"Thin space",string:"\u2009"},{code:8202,description:"Hair space",string:"\u200a"},{code:8232,description:"Line separator",string:"\u2028"},{code:8233,description:"Paragraph separator",string:"\u2029"},{code:8239,description:"Narrow no-break space",string:"\u202f"},{code:8287,description:"Medium mathematical space",string:"\u205f"},{code:12288,description:"Ideographic space",string:"\u3000"},{code:65279,description:"Byte Order Mark",string:"\ufeff"}],string="";_dereq_("array-for-each-x")(list,function reducer(item){string+=item.string}),module.exports={list:list,string:string}},{"array-for-each-x":2}]},{},[1])(1)});
{
"name": "trim-left-x",
"version": "1.3.0",
"version": "1.3.1",
"description": "This method removes whitespace from the left end of a string.",

@@ -33,3 +33,3 @@ "homepage": "https://github.com/Xotic750/trim-left-x",

"to-string-x": "^1.4.0",
"white-space-x": "^2.0.0"
"white-space-x": "^2.0.1"
},

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

@@ -26,3 +26,3 @@ <a href="https://travis-ci.org/Xotic750/trim-left-x"

**Version**: 1.3.0
**Version**: 1.3.1
**Author**: Xotic750 <Xotic750@gmail.com>

@@ -29,0 +29,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