@twin.org/core 0.0.1-next.25 → 0.0.1-next.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +3 -3
- package/dist/esm/index.mjs +3 -3
- package/docs/changelog.md +1 -1
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -2525,7 +2525,7 @@ class ObjectHelper {
|
|
|
2525
2525
|
let pathValue = obj;
|
|
2526
2526
|
for (const pathPart of pathParts) {
|
|
2527
2527
|
// Is the path part numeric i.e. an array index.
|
|
2528
|
-
const arrayMatch =
|
|
2528
|
+
const arrayMatch = /^(\d+)$/.exec(pathPart);
|
|
2529
2529
|
if (arrayMatch) {
|
|
2530
2530
|
const arrayIndex = Number.parseInt(arrayMatch[1], 10);
|
|
2531
2531
|
if (Is.arrayValue(pathValue) && arrayIndex < pathValue.length) {
|
|
@@ -2561,7 +2561,7 @@ class ObjectHelper {
|
|
|
2561
2561
|
for (let i = 0; i < pathParts.length; i++) {
|
|
2562
2562
|
const pathPart = pathParts[i];
|
|
2563
2563
|
// Is the path part numeric i.e. an array index.
|
|
2564
|
-
const arrayMatch =
|
|
2564
|
+
const arrayMatch = /^(\d+)$/.exec(pathPart);
|
|
2565
2565
|
const arrayIndex = arrayMatch ? Number.parseInt(arrayMatch[1], 10) : -1;
|
|
2566
2566
|
if (i === pathParts.length - 1) {
|
|
2567
2567
|
// Last part of path so set the value
|
|
@@ -2592,7 +2592,7 @@ class ObjectHelper {
|
|
|
2592
2592
|
pathValue = pathValue[arrayIndex];
|
|
2593
2593
|
}
|
|
2594
2594
|
if (Is.empty(pathValue)) {
|
|
2595
|
-
const nextArrayMatch =
|
|
2595
|
+
const nextArrayMatch = /^(\d+)$/.exec(pathParts[i + 1]);
|
|
2596
2596
|
const nextArrayIndex = nextArrayMatch ? Number.parseInt(nextArrayMatch[1], 10) : -1;
|
|
2597
2597
|
if (nextArrayIndex >= 0) {
|
|
2598
2598
|
pathValue = [];
|
package/dist/esm/index.mjs
CHANGED
|
@@ -2523,7 +2523,7 @@ class ObjectHelper {
|
|
|
2523
2523
|
let pathValue = obj;
|
|
2524
2524
|
for (const pathPart of pathParts) {
|
|
2525
2525
|
// Is the path part numeric i.e. an array index.
|
|
2526
|
-
const arrayMatch =
|
|
2526
|
+
const arrayMatch = /^(\d+)$/.exec(pathPart);
|
|
2527
2527
|
if (arrayMatch) {
|
|
2528
2528
|
const arrayIndex = Number.parseInt(arrayMatch[1], 10);
|
|
2529
2529
|
if (Is.arrayValue(pathValue) && arrayIndex < pathValue.length) {
|
|
@@ -2559,7 +2559,7 @@ class ObjectHelper {
|
|
|
2559
2559
|
for (let i = 0; i < pathParts.length; i++) {
|
|
2560
2560
|
const pathPart = pathParts[i];
|
|
2561
2561
|
// Is the path part numeric i.e. an array index.
|
|
2562
|
-
const arrayMatch =
|
|
2562
|
+
const arrayMatch = /^(\d+)$/.exec(pathPart);
|
|
2563
2563
|
const arrayIndex = arrayMatch ? Number.parseInt(arrayMatch[1], 10) : -1;
|
|
2564
2564
|
if (i === pathParts.length - 1) {
|
|
2565
2565
|
// Last part of path so set the value
|
|
@@ -2590,7 +2590,7 @@ class ObjectHelper {
|
|
|
2590
2590
|
pathValue = pathValue[arrayIndex];
|
|
2591
2591
|
}
|
|
2592
2592
|
if (Is.empty(pathValue)) {
|
|
2593
|
-
const nextArrayMatch =
|
|
2593
|
+
const nextArrayMatch = /^(\d+)$/.exec(pathParts[i + 1]);
|
|
2594
2594
|
const nextArrayIndex = nextArrayMatch ? Number.parseInt(nextArrayMatch[1], 10) : -1;
|
|
2595
2595
|
if (nextArrayIndex >= 0) {
|
|
2596
2596
|
pathValue = [];
|
package/docs/changelog.md
CHANGED