Skip to content

Commit

Permalink
Check full key text whether can be index or not
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdivyansh committed Jan 23, 2018
1 parent ad13336 commit e1bb99c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dist/dot-object.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
}

function isIndex(k) {
return /^\d+/.test(k)
return /^\d+$/.test(k)
}

function isObject(val) {
Expand Down
2 changes: 1 addition & 1 deletion dist/dot-object.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function parseKey (key, val) {
}

function isIndex (k) {
return /^\d+/.test(k)
return /^\d+$/.test(k)
}

function isObject (val) {
Expand Down
2 changes: 1 addition & 1 deletion src/dot-object.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function parseKey (key, val) {
}

function isIndex (k) {
return /^\d+/.test(k)
return /^\d+$/.test(k)
}

function isObject (val) {
Expand Down

0 comments on commit e1bb99c

Please sign in to comment.