toUInt.js 324 B

123456789101112131415
  1. /**
  2. * "Convert" value into a 32-bit unsigned integer.
  3. * IMPORTANT: Value will wrap at 2^32.
  4. */
  5. function toUInt(val){
  6. // we do not use lang/toNumber because of perf and also because it
  7. // doesn't break the functionality
  8. return val >>> 0;
  9. }
  10. module.exports = toUInt;