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

array-slice-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

array-slice-x - npm Package Compare versions

Comparing version 1.2.0 to 2.0.0

15

index.js
/**
* @file Cross-browser array slicer.
* @version 1.2.0
* @version 2.0.0
* @author Xotic750 <Xotic750@gmail.com>

@@ -16,2 +16,4 @@ * @copyright Xotic750

var isUndefined = require('validate.io-undefined');
var isString = require('is-string');
var splitString = require('has-boxed-string-x') === false;

@@ -22,5 +24,6 @@ var setRelative = function _seedRelative(value, length) {

var slice = function _slice(array, start, end) {
var $slice = function slice(array, start, end) {
var object = toObject(array);
var length = toLength(object.length);
var iterable = splitString && isString(object) ? object.split('') : object;
var length = toLength(iterable.length);
var k = setRelative(toInteger(start), length);

@@ -33,4 +36,4 @@ var relativeEnd = isUndefined(end) ? length : toInteger(end);

while (k < finalEnd) {
if (k in object) {
val[next] = object[k];
if (k in iterable) {
val[next] = iterable[k];
}

@@ -75,2 +78,2 @@

*/
module.exports = slice;
module.exports = $slice;

95

lib/array-slice-x.js
(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 Cross-browser array slicer.
* @version 1.2.0
* @version 2.0.0
* @author Xotic750 <Xotic750@gmail.com>

@@ -17,2 +17,4 @@ * @copyright Xotic750

var isUndefined = _dereq_('validate.io-undefined');
var isString = _dereq_('is-string');
var splitString = _dereq_('has-boxed-string-x') === false;

@@ -23,5 +25,6 @@ var setRelative = function _seedRelative(value, length) {

var slice = function _slice(array, start, end) {
var $slice = function slice(array, start, end) {
var object = toObject(array);
var length = toLength(object.length);
var iterable = splitString && isString(object) ? object.split('') : object;
var length = toLength(iterable.length);
var k = setRelative(toInteger(start), length);

@@ -34,4 +37,4 @@ var relativeEnd = isUndefined(end) ? length : toInteger(end);

while (k < finalEnd) {
if (k in object) {
val[next] = object[k];
if (k in iterable) {
val[next] = iterable[k];
}

@@ -76,5 +79,5 @@

*/
module.exports = slice;
module.exports = $slice;
},{"to-integer-x":16,"to-length-x":17,"to-object-x":18,"validate.io-undefined":19}],2:[function(_dereq_,module,exports){
},{"has-boxed-string-x":4,"is-string":11,"to-integer-x":18,"to-length-x":19,"to-object-x":20,"validate.io-undefined":21}],2:[function(_dereq_,module,exports){
'use strict';

@@ -137,3 +140,3 @@

},{"foreach":3,"object-keys":13}],3:[function(_dereq_,module,exports){
},{"foreach":3,"object-keys":15}],3:[function(_dereq_,module,exports){

@@ -164,2 +167,26 @@ var hasOwn = Object.prototype.hasOwnProperty;

/**
* @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);
},{}],5:[function(_dereq_,module,exports){
/**
* @file ES6-compliant shim for Number.isFinite.

@@ -211,3 +238,3 @@ * @see {@link http://www.ecma-international.org/ecma-262/6.0/#sec-number.isfinite|20.1.2.2 Number.isFinite ( number )}

},{"is-nan":6,"max-safe-integer":12}],5:[function(_dereq_,module,exports){
},{"is-nan":7,"max-safe-integer":14}],6:[function(_dereq_,module,exports){
'use strict';

@@ -221,3 +248,3 @@

},{}],6:[function(_dereq_,module,exports){
},{}],7:[function(_dereq_,module,exports){
'use strict';

@@ -241,3 +268,3 @@

},{"./implementation":5,"./polyfill":7,"./shim":8,"define-properties":2}],7:[function(_dereq_,module,exports){
},{"./implementation":6,"./polyfill":8,"./shim":9,"define-properties":2}],8:[function(_dereq_,module,exports){
'use strict';

@@ -254,3 +281,3 @@

},{"./implementation":5}],8:[function(_dereq_,module,exports){
},{"./implementation":6}],9:[function(_dereq_,module,exports){
'use strict';

@@ -269,3 +296,3 @@

},{"./polyfill":7,"define-properties":2}],9:[function(_dereq_,module,exports){
},{"./polyfill":8,"define-properties":2}],10:[function(_dereq_,module,exports){
/**

@@ -301,3 +328,25 @@ * @file Checks if `value` is `null` or `undefined`.

},{"lodash.isnull":10,"validate.io-undefined":19}],10:[function(_dereq_,module,exports){
},{"lodash.isnull":12,"validate.io-undefined":21}],11:[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;
};
},{}],12:[function(_dereq_,module,exports){
/**

@@ -334,3 +383,3 @@ * lodash 3.0.0 (Custom Build) <https://lodash.com/>

},{}],11:[function(_dereq_,module,exports){
},{}],13:[function(_dereq_,module,exports){
/**

@@ -388,7 +437,7 @@ * @file ES6-compliant shim for Math.sign.

},{"is-nan":6}],12:[function(_dereq_,module,exports){
},{"is-nan":7}],14:[function(_dereq_,module,exports){
'use strict';
module.exports = 9007199254740991;
},{}],13:[function(_dereq_,module,exports){
},{}],15:[function(_dereq_,module,exports){
'use strict';

@@ -535,3 +584,3 @@

},{"./isArguments":14}],14:[function(_dereq_,module,exports){
},{"./isArguments":16}],16:[function(_dereq_,module,exports){
'use strict';

@@ -555,3 +604,3 @@

},{}],15:[function(_dereq_,module,exports){
},{}],17:[function(_dereq_,module,exports){
/**

@@ -595,3 +644,3 @@ * @file ES6-compliant shim for RequireObjectCoercible.

},{"is-nil-x":9}],16:[function(_dereq_,module,exports){
},{"is-nil-x":10}],18:[function(_dereq_,module,exports){
/**

@@ -639,3 +688,3 @@ * @file ToInteger converts 'argument' to an integral numeric value.

},{"is-finite-x":4,"is-nan":6,"math-sign-x":11}],17:[function(_dereq_,module,exports){
},{"is-finite-x":5,"is-nan":7,"math-sign-x":13}],19:[function(_dereq_,module,exports){
/**

@@ -683,3 +732,3 @@ * @file ES6-compliant shim for ToLength.

},{"max-safe-integer":12,"to-integer-x":16}],18:[function(_dereq_,module,exports){
},{"max-safe-integer":14,"to-integer-x":18}],20:[function(_dereq_,module,exports){
/**

@@ -719,3 +768,3 @@ * @file ES6-compliant shim for ToObject.

},{"require-object-coercible-x":15}],19:[function(_dereq_,module,exports){
},{"require-object-coercible-x":17}],21:[function(_dereq_,module,exports){
/**

@@ -722,0 +771,0 @@ *

!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 Cross-browser array slicer.
* @version 1.2.0
* @version 2.0.0
* @author Xotic750 <Xotic750@gmail.com>

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

*/
"use strict";var toObject=_dereq_("to-object-x"),toInteger=_dereq_("to-integer-x"),toLength=_dereq_("to-length-x"),isUndefined=_dereq_("validate.io-undefined"),setRelative=function _seedRelative(value,length){return value<0?Math.max(length+value,0):Math.min(value,length)};module.exports=function _slice(array,start,end){var object=toObject(array),length=toLength(object.length),k=setRelative(toInteger(start),length),relativeEnd=isUndefined(end)?length:toInteger(end),finalEnd=setRelative(relativeEnd,length),val=[];val.length=Math.max(finalEnd-k,0);for(var next=0;k<finalEnd;)k in object&&(val[next]=object[k]),next+=1,k+=1;return val}},{"to-integer-x":16,"to-length-x":17,"to-object-x":18,"validate.io-undefined":19}],2:[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:3,"object-keys":13}],3:[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)}},{}],4:[function(_dereq_,module,exports){/**
"use strict";var toObject=_dereq_("to-object-x"),toInteger=_dereq_("to-integer-x"),toLength=_dereq_("to-length-x"),isUndefined=_dereq_("validate.io-undefined"),isString=_dereq_("is-string"),splitString=!1===_dereq_("has-boxed-string-x"),setRelative=function _seedRelative(value,length){return value<0?Math.max(length+value,0):Math.min(value,length)};module.exports=function slice(array,start,end){var object=toObject(array),iterable=splitString&&isString(object)?object.split(""):object,length=toLength(iterable.length),k=setRelative(toInteger(start),length),relativeEnd=isUndefined(end)?length:toInteger(end),finalEnd=setRelative(relativeEnd,length),val=[];val.length=Math.max(finalEnd-k,0);for(var next=0;k<finalEnd;)k in iterable&&(val[next]=iterable[k]),next+=1,k+=1;return val}},{"has-boxed-string-x":4,"is-string":11,"to-integer-x":18,"to-length-x":19,"to-object-x":20,"validate.io-undefined":21}],2:[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:3,"object-keys":15}],3:[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)}},{}],4:[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},{}],5:[function(_dereq_,module,exports){/**
* @file ES6-compliant shim for Number.isFinite.

@@ -19,3 +27,3 @@ * @see {@link http://www.ecma-international.org/ecma-262/6.0/#sec-number.isfinite|20.1.2.2 Number.isFinite ( number )}

*/
"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":6,"max-safe-integer":12}],5:[function(_dereq_,module,exports){"use strict";module.exports=function isNaN(value){return value!==value}},{}],6:[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":5,"./polyfill":7,"./shim":8,"define-properties":2}],7:[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":5}],8:[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":7,"define-properties":2}],9:[function(_dereq_,module,exports){/**
"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":7,"max-safe-integer":14}],6:[function(_dereq_,module,exports){"use strict";module.exports=function isNaN(value){return value!==value}},{}],7:[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":6,"./polyfill":8,"./shim":9,"define-properties":2}],8:[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":6}],9:[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":8,"define-properties":2}],10:[function(_dereq_,module,exports){/**
* @file Checks if `value` is `null` or `undefined`.

@@ -28,3 +36,3 @@ * @version 1.4.0

*/
"use strict";var isUndefined=_dereq_("validate.io-undefined"),isNull=_dereq_("lodash.isnull");module.exports=function isNil(value){return isNull(value)||isUndefined(value)}},{"lodash.isnull":10,"validate.io-undefined":19}],10:[function(_dereq_,module,exports){module.exports=function isNull(value){return null===value}},{}],11:[function(_dereq_,module,exports){/**
"use strict";var isUndefined=_dereq_("validate.io-undefined"),isNull=_dereq_("lodash.isnull");module.exports=function isNil(value){return isNull(value)||isUndefined(value)}},{"lodash.isnull":12,"validate.io-undefined":21}],11:[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))}},{}],12:[function(_dereq_,module,exports){module.exports=function isNull(value){return null===value}},{}],13:[function(_dereq_,module,exports){/**
* @file ES6-compliant shim for Math.sign.

@@ -38,3 +46,3 @@ * @see {@link http://www.ecma-international.org/ecma-262/6.0/#sec-math.sign|20.2.2.29 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":6}],12:[function(_dereq_,module,exports){"use strict";module.exports=9007199254740991},{}],13:[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":14}],14:[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}},{}],15:[function(_dereq_,module,exports){/**
"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":7}],14:[function(_dereq_,module,exports){"use strict";module.exports=9007199254740991},{}],15:[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":16}],16:[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}},{}],17:[function(_dereq_,module,exports){/**
* @file ES6-compliant shim for RequireObjectCoercible.

@@ -48,3 +56,3 @@ * @see {@link http://www.ecma-international.org/ecma-262/6.0/#sec-requireobjectcoercible|7.2.1 RequireObjectCoercible ( argument )}

*/
"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":9}],16:[function(_dereq_,module,exports){/**
"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":10}],18:[function(_dereq_,module,exports){/**
* @file ToInteger converts 'argument' to an integral numeric value.

@@ -58,3 +66,3 @@ * @see {@link http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger|7.1.4 ToInteger ( argument )}

*/
"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":4,"is-nan":6,"math-sign-x":11}],17:[function(_dereq_,module,exports){/**
"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":5,"is-nan":7,"math-sign-x":13}],19:[function(_dereq_,module,exports){/**
* @file ES6-compliant shim for ToLength.

@@ -68,3 +76,3 @@ * @see {@link http://www.ecma-international.org/ecma-262/6.0/#sec-tolength|7.1.15 ToLength ( argument )}

*/
"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":12,"to-integer-x":16}],18:[function(_dereq_,module,exports){/**
"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":14,"to-integer-x":18}],20:[function(_dereq_,module,exports){/**
* @file ES6-compliant shim for ToObject.

@@ -78,2 +86,2 @@ * @see {@link http://www.ecma-international.org/ecma-262/6.0/#sec-toobject|7.1.13 ToObject ( argument )}

*/
"use strict";var $requireObjectCoercible=_dereq_("require-object-coercible-x");module.exports=function ToObject(value){return Object($requireObjectCoercible(value))}},{"require-object-coercible-x":15}],19:[function(_dereq_,module,exports){"use strict";module.exports=function isUndefined(value){return void 0===value}},{}]},{},[1])(1)});
"use strict";var $requireObjectCoercible=_dereq_("require-object-coercible-x");module.exports=function ToObject(value){return Object($requireObjectCoercible(value))}},{"require-object-coercible-x":17}],21:[function(_dereq_,module,exports){"use strict";module.exports=function isUndefined(value){return void 0===value}},{}]},{},[1])(1)});
{
"name": "array-slice-x",
"version": "1.2.0",
"version": "2.0.0",
"description": "Cross-browser array slicer.",

@@ -32,2 +32,4 @@ "homepage": "https://github.com/Xotic750/array-slice-x",

"dependencies": {
"has-boxed-string-x": "^1.0.0",
"is-string": "^1.0.4",
"to-integer-x": "^1.4.0",

@@ -34,0 +36,0 @@ "to-length-x": "^1.4.0",

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

**Version**: 1.2.0
**Version**: 2.0.0
**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