7 lines
213 B
JavaScript
7 lines
213 B
JavaScript
var toInteger = require('../internals/to-integer');
|
|
|
|
module.exports = function (it, BYTES) {
|
|
var offset = toInteger(it);
|
|
if (offset < 0 || offset % BYTES) throw RangeError('Wrong offset');
|
|
return offset;
|
|
};
|