Improve reIsUint to filter strings like '0001' and add tests.

This commit is contained in:
Xotic750
2015-10-30 22:27:51 +01:00
committed by John-David Dalton
parent 7e726735ba
commit c7ef030ef5
2 changed files with 4 additions and 1 deletions

View File

@@ -132,7 +132,7 @@
var reIsHostCtor = /^\[object .+?Constructor\]$/;
/** Used to detect unsigned integer values. */
var reIsUint = /^\d+$/;
var reIsUint = /^(?:\d|[1-9]\d+)$/;
/** Used to match latin-1 supplementary letters (excluding mathematical operators). */
var reLatin1 = /[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g;