update
parent
32d0841e60
commit
c4b40bcb08
|
@ -1,4 +1,4 @@
|
||||||
1.1.0 / 2018-06-29
|
1.1.1 / 2018-06-29
|
||||||
==================
|
==================
|
||||||
* add Number.parse
|
* add Number.parse
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,9 @@
|
||||||
if (!Number.parse) {
|
if (!Number.parse) {
|
||||||
Object.defineProperty(Number, 'parse', {
|
Object.defineProperty(Number, 'parse', {
|
||||||
value: function(val) {
|
value: function(val) {
|
||||||
|
if (typeof val !== 'number' && typeof val !== 'string') {
|
||||||
|
return val
|
||||||
|
}
|
||||||
val += ''
|
val += ''
|
||||||
if (val.startsWith(0) && !val.startsWith('0.')) {
|
if (val.startsWith(0) && !val.startsWith('0.')) {
|
||||||
return val
|
return val
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "es.shim",
|
"name": "es.shim",
|
||||||
"version": "1.1.0",
|
"version": "1.1.1",
|
||||||
"description": "Some shim api that let you can use in all node.js environment",
|
"description": "Some shim api that let you can use in all node.js environment",
|
||||||
"keyworks": [
|
"keyworks": [
|
||||||
"es5",
|
"es5",
|
||||||
|
|
Loading…
Reference in New Issue