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

to-length-x

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

to-length-x - npm Package Compare versions

Comparing version 1.1.2 to 1.2.0

6

index.js

@@ -31,3 +31,3 @@ /**

*
* @version 1.1.2
* @version 1.2.0
* @author Xotic750 <Xotic750@gmail.com>

@@ -39,3 +39,3 @@ * @copyright Xotic750

/* eslint strict: 1, max-statements: 1 */
/* eslint strict: 1 */

@@ -64,3 +64,3 @@ /* global module */

*/
module.exports = function toLength(value) {
module.exports = function ToLength(value) {
var len = toInteger(value);

@@ -67,0 +67,0 @@ if (len <= 0) {

@@ -32,3 +32,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.1.2
* @version 1.2.0
* @author Xotic750 <Xotic750@gmail.com>

@@ -40,3 +40,3 @@ * @copyright Xotic750

/* eslint strict: 1, max-statements: 1 */
/* eslint strict: 1 */

@@ -65,3 +65,3 @@ /* global module */

*/
module.exports = function toLength(value) {
module.exports = function ToLength(value) {
var len = toInteger(value);

@@ -191,3 +191,3 @@ if (len <= 0) {

*
* @version 1.0.0
* @version 1.1.0
* @author Xotic750 <Xotic750@gmail.com>

@@ -327,3 +327,3 @@ * @copyright Xotic750

*
* @version 1.0.0
* @version 1.1.0
* @author Xotic750 <Xotic750@gmail.com>

@@ -575,3 +575,3 @@ * @copyright Xotic750

*
* @version 1.1.3
* @version 1.2.0
* @author Xotic750 <Xotic750@gmail.com>

@@ -608,3 +608,3 @@ * @copyright Xotic750

*/
module.exports = function toInteger(value) {
module.exports = function ToInteger(value) {
var number = Number(value);

@@ -611,0 +611,0 @@ if ($isNaN(number)) {

@@ -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,n,r){function s(i,u){if(!n[i]){if(!t[i]){var c="function"==typeof require&&require;if(!u&&c)return c(i,!0);if(o)return o(i,!0);var f=new Error("Cannot find module '"+i+"'");throw f.code="MODULE_NOT_FOUND",f}var a=n[i]={exports:{}};t[i][0].call(a.exports,function(e){var n=t[i][1][e];return s(n?n:e)},a,a.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(t,e,n){!function(){"use strict";var n=t("to-integer-x");e.exports=function toLength(t){var e=n(t);return e<=0?0:e>9007199254740991?9007199254740991:e}}()},{"to-integer-x":12}],2:[function(t,e,n){"use strict";var r=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)},f=Object.defineProperty&&function(){var t={};try{Object.defineProperty(t,"x",{enumerable:!1,value:t});for(var e in t)return!1;return t.x===t}catch(t){return!1}}(),s=function(t,e,n,r){(!(e in t)||c(r)&&r())&&(f?Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:n,writable:!0}):t[e]=n)},a=function(t,e){var n=arguments.length>2?arguments[2]:{},u=r(e);i&&(u=u.concat(Object.getOwnPropertySymbols(e))),o(u,function(r){s(t,r,e[r],n[r])})};a.supportsDescriptors=!!f,e.exports=a},{foreach:3,"object-keys":10}],3:[function(t,e,n){var r=Object.prototype.hasOwnProperty,o=Object.prototype.toString;e.exports=function forEach(t,e,n){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;u<i;u++)e.call(n,t[u],u,t);else for(var c in t)r.call(t,c)&&e.call(n,t[c],c,t)}},{}],4:[function(t,e,n){!function(){"use strict";var n,r=t("is-nan");if("function"==typeof Number.isFinite)try{Number.isFinite(9007199254740991)&&!Number.isFinite(1/0)&&(n=Number.isFinite)}catch(t){}e.exports=n||function isFinite(t){return!("number"!=typeof t||r(t)||t===1/0||t===-(1/0))}}()},{"is-nan":6}],5:[function(t,e,n){"use strict";e.exports=function isNaN(t){return t!==t}},{}],6:[function(t,e,n){"use strict";var r=t("define-properties"),o=t("./implementation");r(o,{getPolyfill:t("./polyfill"),implementation:o,shim:t("./shim")}),e.exports=o},{"./implementation":5,"./polyfill":7,"./shim":8,"define-properties":2}],7:[function(t,e,n){"use strict";var r=t("./implementation");e.exports=function getPolyfill(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:r}},{"./implementation":5}],8:[function(t,e,n){"use strict";var r=t("define-properties"),o=t("./polyfill");e.exports=function shimNumberIsNaN(){var t=o();return r(Number,{isNaN:t},{isNaN:function(){return Number.isNaN!==t}}),t}},{"./polyfill":7,"define-properties":2}],9:[function(t,e,n){!function(){"use strict";var n,r=t("is-nan");if("function"==typeof Math.sign)try{1===Math.sign(10)&&Math.sign(-10)===-1&&0===Math.sign(0)&&(n=Math.sign)}catch(t){}e.exports=n||function sign(t){var e=Number(t);return 0===e||r(e)?e:e>0?1:-1}}()},{"is-nan":6}],10:[function(t,e,n){"use strict";var r=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=Array.prototype.slice,u=t("./isArguments"),c=Object.prototype.propertyIsEnumerable,f=!c.call({toString:null},"toString"),s=c.call(function(){},"prototype"),a=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],l=function(t){var e=t.constructor;return e&&e.prototype===t},p={$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},y=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!p["$"+t]&&r.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{l(window[t])}catch(t){return!0}}catch(t){return!0}return!1}(),b=function(t){if("undefined"==typeof window||!y)return l(t);try{return l(t)}catch(t){return!1}},m=function keys(t){var e=null!==t&&"object"==typeof t,n="[object Function]"===o.call(t),i=u(t),c=e&&"[object String]"===o.call(t),l=[];if(!e&&!n&&!i)throw new TypeError("Object.keys called on a non-object");var p=s&&n;if(c&&t.length>0&&!r.call(t,0))for(var y=0;y<t.length;++y)l.push(String(y));if(i&&t.length>0)for(var m=0;m<t.length;++m)l.push(String(m));else for(var h in t)p&&"prototype"===h||!r.call(t,h)||l.push(String(h));if(f)for(var g=b(t),d=0;d<a.length;++d)g&&"constructor"===a[d]||!r.call(t,a[d])||l.push(a[d]);return l};m.shim=function shimObjectKeys(){if(Object.keys){if(!function(){return 2===(Object.keys(arguments)||"").length}(1,2)){var t=Object.keys;Object.keys=function keys(e){return t(u(e)?i.call(e):e)}}}else Object.keys=m;return Object.keys||m},e.exports=m},{"./isArguments":11}],11:[function(t,e,n){"use strict";var r=Object.prototype.toString;e.exports=function isArguments(t){var e=r.call(t),n="[object Arguments]"===e;return n||(n="[object Array]"!==e&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===r.call(t.callee)),n}},{}],12:[function(t,e,n){!function(){"use strict";var n=t("is-nan"),r=t("is-finite-x"),o=t("math-sign-x");e.exports=function toInteger(t){var e=Number(t);return n(e)?0:0!==e&&r(e)?o(e)*Math.floor(Math.abs(e)):e}}()},{"is-finite-x":4,"is-nan":6,"math-sign-x":9}]},{},[1])(1)});
!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,n,r){function s(i,u){if(!n[i]){if(!t[i]){var c="function"==typeof require&&require;if(!u&&c)return c(i,!0);if(o)return o(i,!0);var f=new Error("Cannot find module '"+i+"'");throw f.code="MODULE_NOT_FOUND",f}var a=n[i]={exports:{}};t[i][0].call(a.exports,function(e){var n=t[i][1][e];return s(n?n:e)},a,a.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(t,e,n){!function(){"use strict";var n=t("to-integer-x");e.exports=function ToLength(t){var e=n(t);return e<=0?0:e>9007199254740991?9007199254740991:e}}()},{"to-integer-x":12}],2:[function(t,e,n){"use strict";var r=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)},f=Object.defineProperty&&function(){var t={};try{Object.defineProperty(t,"x",{enumerable:!1,value:t});for(var e in t)return!1;return t.x===t}catch(t){return!1}}(),s=function(t,e,n,r){(!(e in t)||c(r)&&r())&&(f?Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:n,writable:!0}):t[e]=n)},a=function(t,e){var n=arguments.length>2?arguments[2]:{},u=r(e);i&&(u=u.concat(Object.getOwnPropertySymbols(e))),o(u,function(r){s(t,r,e[r],n[r])})};a.supportsDescriptors=!!f,e.exports=a},{foreach:3,"object-keys":10}],3:[function(t,e,n){var r=Object.prototype.hasOwnProperty,o=Object.prototype.toString;e.exports=function forEach(t,e,n){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;u<i;u++)e.call(n,t[u],u,t);else for(var c in t)r.call(t,c)&&e.call(n,t[c],c,t)}},{}],4:[function(t,e,n){!function(){"use strict";var n,r=t("is-nan");if("function"==typeof Number.isFinite)try{Number.isFinite(9007199254740991)&&!Number.isFinite(1/0)&&(n=Number.isFinite)}catch(t){}e.exports=n||function isFinite(t){return!("number"!=typeof t||r(t)||t===1/0||t===-(1/0))}}()},{"is-nan":6}],5:[function(t,e,n){"use strict";e.exports=function isNaN(t){return t!==t}},{}],6:[function(t,e,n){"use strict";var r=t("define-properties"),o=t("./implementation");r(o,{getPolyfill:t("./polyfill"),implementation:o,shim:t("./shim")}),e.exports=o},{"./implementation":5,"./polyfill":7,"./shim":8,"define-properties":2}],7:[function(t,e,n){"use strict";var r=t("./implementation");e.exports=function getPolyfill(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:r}},{"./implementation":5}],8:[function(t,e,n){"use strict";var r=t("define-properties"),o=t("./polyfill");e.exports=function shimNumberIsNaN(){var t=o();return r(Number,{isNaN:t},{isNaN:function(){return Number.isNaN!==t}}),t}},{"./polyfill":7,"define-properties":2}],9:[function(t,e,n){!function(){"use strict";var n,r=t("is-nan");if("function"==typeof Math.sign)try{1===Math.sign(10)&&Math.sign(-10)===-1&&0===Math.sign(0)&&(n=Math.sign)}catch(t){}e.exports=n||function sign(t){var e=Number(t);return 0===e||r(e)?e:e>0?1:-1}}()},{"is-nan":6}],10:[function(t,e,n){"use strict";var r=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=Array.prototype.slice,u=t("./isArguments"),c=Object.prototype.propertyIsEnumerable,f=!c.call({toString:null},"toString"),s=c.call(function(){},"prototype"),a=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],l=function(t){var e=t.constructor;return e&&e.prototype===t},p={$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},y=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!p["$"+t]&&r.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{l(window[t])}catch(t){return!0}}catch(t){return!0}return!1}(),b=function(t){if("undefined"==typeof window||!y)return l(t);try{return l(t)}catch(t){return!1}},m=function keys(t){var e=null!==t&&"object"==typeof t,n="[object Function]"===o.call(t),i=u(t),c=e&&"[object String]"===o.call(t),l=[];if(!e&&!n&&!i)throw new TypeError("Object.keys called on a non-object");var p=s&&n;if(c&&t.length>0&&!r.call(t,0))for(var y=0;y<t.length;++y)l.push(String(y));if(i&&t.length>0)for(var m=0;m<t.length;++m)l.push(String(m));else for(var h in t)p&&"prototype"===h||!r.call(t,h)||l.push(String(h));if(f)for(var g=b(t),d=0;d<a.length;++d)g&&"constructor"===a[d]||!r.call(t,a[d])||l.push(a[d]);return l};m.shim=function shimObjectKeys(){if(Object.keys){if(!function(){return 2===(Object.keys(arguments)||"").length}(1,2)){var t=Object.keys;Object.keys=function keys(e){return t(u(e)?i.call(e):e)}}}else Object.keys=m;return Object.keys||m},e.exports=m},{"./isArguments":11}],11:[function(t,e,n){"use strict";var r=Object.prototype.toString;e.exports=function isArguments(t){var e=r.call(t),n="[object Arguments]"===e;return n||(n="[object Array]"!==e&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===r.call(t.callee)),n}},{}],12:[function(t,e,n){!function(){"use strict";var n=t("is-nan"),r=t("is-finite-x"),o=t("math-sign-x");e.exports=function ToInteger(t){var e=Number(t);return n(e)?0:0!==e&&r(e)?o(e)*Math.floor(Math.abs(e)):e}}()},{"is-finite-x":4,"is-nan":6,"math-sign-x":9}]},{},[1])(1)});
//# sourceMappingURL=lib/to-length-x.map
{
"name": "to-length-x",
"version": "1.1.2",
"version": "1.2.0",
"description": "ES6-compliant shim for ToLength.",

@@ -10,3 +10,3 @@ "homepage": "https://github.com/Xotic750/to-length-x",

},
"copyright": "Copyright (c) 2015-2016",
"copyright": "Copyright (c) 2015-2017",
"keywords": [

@@ -33,3 +33,3 @@ "es6",

"dependencies": {
"to-integer-x": "^1.1.3"
"to-integer-x": "^1.2.0"
},

@@ -48,6 +48,6 @@ "devDependencies": {

"json3": "^3.3.2",
"make-jasmine-spec-runner-html": "^1.0.4",
"make-jasmine-spec-runner-html": "^1.1.0",
"nodemon": "^1.11.0",
"nsp": "^2.6.3",
"replace-x": "^1.0.0",
"replace-x": "^1.1.1",
"uglify-js": "^2.8.16"

@@ -54,0 +54,0 @@ },

@@ -31,3 +31,3 @@ <a name="module_to-length-x"></a>

**See**: [7.1.15 ToLength ( argument )](http://www.ecma-international.org/ecma-262/6.0/#sec-tolength)
**Version**: 1.1.2
**Version**: 1.2.0
**Author**: Xotic750 <Xotic750@gmail.com>

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

Sorry, the diff of this file is not supported yet

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