MCPcopy Create free account
hub / github.com/RubyLouvre/anu / toInteger

Function toInteger

test/babel.js:4182–4187  ·  view source on GitHub ↗

* Converts `value` to an integer. * * **Note:** This method is loosely based on * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to convert. * @returns {number} R

(value)

Source from the content-addressed store, hash-verified

4180 * // => 3
4181 */
4182 function toInteger(value) {
4183 var result = toFinite(value),
4184 remainder = result % 1;
4185
4186 return result === result ? remainder ? result - remainder : result : 0;
4187 }
4188
4189 module.exports = toInteger;
4190

Callers 7

includesFunction · 0.85
babel.jsFile · 0.85
repeatFunction · 0.85
findIndexFunction · 0.85
findLastIndexFunction · 0.85
isIntegerFunction · 0.85
startsWithFunction · 0.85

Calls 1

toFiniteFunction · 0.85

Tested by

no test coverage detected