]> git.r.bdr.sh - rbdr/dotfiles/blob
60e798c5fda58df28f8d146849336afa4b78770a
[rbdr/dotfiles] /
1 'use strict';
2
3 var sign = require('../math/sign')
4
5 , abs = Math.abs, floor = Math.floor;
6
7 module.exports = function (value) {
8 if (isNaN(value)) return 0;
9 value = Number(value);
10 if ((value === 0) || !isFinite(value)) return value;
11 return sign(value) * floor(abs(value));
12 };