Sha256: 4cf51cc2204bfa311dcf4cf927ac9146989a98567d18ff6edff8894d2d177a0d

Contents?: true

Size: 223 Bytes

Versions: 66

Compression:

Stored size: 223 Bytes

Contents

var toInteger = require('./_to-integer');
var max = Math.max;
var min = Math.min;
module.exports = function (index, length) {
  index = toInteger(index);
  return index < 0 ? max(index + length, 0) : min(index, length);
};

Version data entries

66 entries across 30 versions & 8 rubygems

Version Path
immosquare-cleaner-0.1.52 node_modules/core-js/library/modules/_to-absolute-index.js
immosquare-cleaner-0.1.52 node_modules/core-js/modules/_to-absolute-index.js
immosquare-cleaner-0.1.51 node_modules/core-js/modules/_to-absolute-index.js
immosquare-cleaner-0.1.51 node_modules/core-js/library/modules/_to-absolute-index.js
immosquare-cleaner-0.1.50 node_modules/core-js/library/modules/_to-absolute-index.js
immosquare-cleaner-0.1.50 node_modules/core-js/modules/_to-absolute-index.js
immosquare-cleaner-0.1.49 node_modules/core-js/library/modules/_to-absolute-index.js
immosquare-cleaner-0.1.49 node_modules/core-js/modules/_to-absolute-index.js
immosquare-cleaner-0.1.48 node_modules/core-js/library/modules/_to-absolute-index.js
immosquare-cleaner-0.1.48 node_modules/core-js/modules/_to-absolute-index.js
immosquare-cleaner-0.1.47 node_modules/core-js/library/modules/_to-absolute-index.js
immosquare-cleaner-0.1.47 node_modules/core-js/modules/_to-absolute-index.js
immosquare-cleaner-0.1.46 node_modules/core-js/library/modules/_to-absolute-index.js
immosquare-cleaner-0.1.46 node_modules/core-js/modules/_to-absolute-index.js
immosquare-cleaner-0.1.45 node_modules/core-js/library/modules/_to-absolute-index.js
immosquare-cleaner-0.1.45 node_modules/core-js/modules/_to-absolute-index.js
immosquare-cleaner-0.1.44 node_modules/core-js/library/modules/_to-absolute-index.js
immosquare-cleaner-0.1.44 node_modules/core-js/modules/_to-absolute-index.js
immosquare-cleaner-0.1.43 node_modules/core-js/library/modules/_to-absolute-index.js
immosquare-cleaner-0.1.43 node_modules/core-js/modules/_to-absolute-index.js