MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / toInteger

Function toInteger

lib/web/polyfill.js:303–305  ·  view source on GitHub ↗
(it)

Source from the content-addressed store, hash-verified

301}
302// 7.1.4 ToInteger
303function toInteger(it){
304 return isNaN(it) ? 0 : trunc(it);
305}
306// 7.1.15 ToLength
307function toLength(it){
308 return it > 0 ? min(toInteger(it), MAX_SAFE_INTEGER) : 0;

Callers 4

toLengthFunction · 0.85
toIndexFunction · 0.85
createPointAtFunction · 0.85
polyfill.jsFile · 0.85

Calls 2

isNaNFunction · 0.85
truncFunction · 0.85

Tested by

no test coverage detected