to-offset.js 224 B

1234567
  1. var toPositiveInteger = require('../internals/to-positive-integer');
  2. module.exports = function (it, BYTES) {
  3. var offset = toPositiveInteger(it);
  4. if (offset % BYTES) throw RangeError('Wrong offset');
  5. return offset;
  6. };