MCPcopy Index your code
hub / github.com/stemkoski/stemkoski.github.com / coerce

Function coerce

MathBox/mathbox-core.js:1926–1932  ·  view source on GitHub ↗
(length)

Source from the content-addressed store, hash-verified

1924}
1925
1926function coerce (length) {
1927 // Coerce length to a number (possibly NaN), round up
1928 // in case it's fractional (e.g. 123.456) then do a
1929 // double negate to coerce a NaN to 0. Easy, right?
1930 length = ~~Math.ceil(+length)
1931 return length < 0 ? 0 : length
1932}
1933
1934function isArray (subject) {
1935 return (Array.isArray || function (subject) {

Callers 1

BufferFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected