We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0741366 commit 5d7ec67Copy full SHA for 5d7ec67
lib/schema.js
@@ -37,6 +37,8 @@ const isPOJO = utils.isPOJO;
37
38
let id = 0;
39
40
+const numberRE = /^\d+$/;
41
+
42
/**
43
* Schema constructor.
44
*
@@ -2638,7 +2640,7 @@ Schema.prototype._getSchema = function(path) {
2638
2640
// Re: gh-5628, because `schema.path()` doesn't take $ into account.
2639
2641
parts[i] = '0';
2642
}
- if (/^\d+$/.test(parts[i])) {
2643
+ if (numberRE.test(parts[i])) {
2644
parts[i] = '$';
2645
2646
0 commit comments