1
0
mirror of https://github.com/S2-/minifyfromhtml.git synced 2025-08-03 12:20:04 +02:00
Files
minifyfromhtml/node_modules/core-js/modules/_to-absolute-index.js
2018-05-05 13:54:07 +02:00

8 lines
223 B
JavaScript

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);
};