$ npm install math-trunc
ES6 Math.trunc() ponyfill
Math.trunc()
Ponyfill: A polyfill that doesn't overwrite the native method
$ npm install --save math-trunc
var mathTrunc = require('math-trunc'); mathTrunc(13.37); //=> 13 mathTrunc(-0.123); //=> -0
MIT © Kevin Mårtensson