Sha256: bd6e39852197694b228b26f66ee96444115965dd4d82cc5187bfaafa2b4e80e7

Contents?: true

Size: 439 Bytes

Versions: 17

Compression:

Stored size: 439 Bytes

Contents

var toInteger = require('../internals/to-integer');

var max = Math.max;
var min = Math.min;

// Helper for a popular repeating case of the spec:
// Let integer be ? ToInteger(index).
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
module.exports = function (index, length) {
  var integer = toInteger(index);
  return integer < 0 ? max(integer + length, 0) : min(integer, length);
};

Version data entries

17 entries across 16 versions & 6 rubygems

Version Path
optimacms-0.1.61 spec/dummy/node_modules/core-js/internals/to-absolute-index.js
tang-0.2.1 spec/tang_app/node_modules/core-js/internals/to-absolute-index.js
groonga-client-model-6.0.0 test/apps/rails6.1.3/node_modules/core-js/internals/to-absolute-index.js
groonga-client-model-6.0.0 test/apps/rails6.0.3.5/node_modules/core-js/internals/to-absolute-index.js
ruby2js-4.0.4 lib/tasks/testrails/node_modules/core-js/internals/to-absolute-index.js
ruby2js-4.0.3 lib/tasks/testrails/node_modules/core-js/internals/to-absolute-index.js
tang-0.2.0 spec/tang_app/node_modules/core-js/internals/to-absolute-index.js
tang-0.1.0 spec/tang_app/node_modules/core-js/internals/to-absolute-index.js
tang-0.0.9 spec/tang_app/node_modules/core-js/internals/to-absolute-index.js
enju_library-0.3.8 spec/dummy/node_modules/core-js/internals/to-absolute-index.js
condenser-0.3 lib/condenser/processors/node_modules/core-js-pure/internals/to-absolute-index.js
condenser-0.2 lib/condenser/processors/node_modules/core-js-pure/internals/to-absolute-index.js
condenser-0.1 lib/condenser/processors/node_modules/core-js-pure/internals/to-absolute-index.js
condenser-0.0.12 lib/condenser/processors/node_modules/core-js-pure/internals/to-absolute-index.js
condenser-0.0.11 lib/condenser/processors/node_modules/core-js-pure/internals/to-absolute-index.js
condenser-0.0.10 lib/condenser/processors/node_modules/core-js-pure/internals/to-absolute-index.js
condenser-0.0.9 lib/condenser/processors/node_modules/core-js-pure/internals/to-absolute-index.js