master
宇天 2018-07-02 14:47:23 +08:00
parent c4b40bcb08
commit 4f9c6ef8c9
2 changed files with 7 additions and 3 deletions

View File

@ -16,8 +16,12 @@ if (!Number.parse) {
return val
}
val += ''
if (val.startsWith(0) && !val.startsWith('0.')) {
return val
if (val.startsWith('0') && !val.startsWith('0.')) {
if (val === '0') {
return 0
} else {
return val
}
} else {
if (isFinite(val)) {
if (

View File

@ -1,6 +1,6 @@
{
"name": "es.shim",
"version": "1.1.1",
"version": "1.1.2",
"description": "Some shim api that let you can use in all node.js environment",
"keyworks": [
"es5",