Packages

A web application in pursuit of meaning in life.

Retired package: Complete rewrite, scratch old versions

Current section

Files

Jump to
udia assets node_modules mout src number toUInt.js
Raw

assets/node_modules/mout/src/number/toUInt.js

define(function () {
/**
* "Convert" value into a 32-bit unsigned integer.
* IMPORTANT: Value will wrap at 2^32.
*/
function toUInt(val){
// we do not use lang/toNumber because of perf and also because it
// doesn't break the functionality
return val >>> 0;
}
return toUInt;
});