projects
/
yaffs-website
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Version 1
[yaffs-website]
/
node_modules
/
underscore.string
/
toNumber.js
1
module.exports = function toNumber(num, precision) {
2
if (num == null) return 0;
3
var factor = Math.pow(10, isFinite(precision) ? precision : 0);
4
return Math.round(num * factor) / factor;
5
};