circular-reference 1.0.0 → 1.0.2
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/README.md +2 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +7 -1
package/README.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
declare const parseCircularReferences: (data:
|
|
1
|
+
declare const parseCircularReferences: (data: object, clone?: boolean) => void;
|
|
2
2
|
|
|
3
|
-
declare const stringifyCircularReferences: (data:
|
|
3
|
+
declare const stringifyCircularReferences: (data: object, clone?: boolean) => object;
|
|
4
4
|
|
|
5
5
|
export { parseCircularReferences, stringifyCircularReferences };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
declare const parseCircularReferences: (data:
|
|
1
|
+
declare const parseCircularReferences: (data: object, clone?: boolean) => void;
|
|
2
2
|
|
|
3
|
-
declare const stringifyCircularReferences: (data:
|
|
3
|
+
declare const stringifyCircularReferences: (data: object, clone?: boolean) => object;
|
|
4
4
|
|
|
5
5
|
export { parseCircularReferences, stringifyCircularReferences };
|
package/dist/index.js
CHANGED
|
@@ -75,7 +75,7 @@ var parseRecursion = (parentObj, objReferenceMap, pathObjectMap, path, unresolve
|
|
|
75
75
|
if (typeof parentObj !== "object") {
|
|
76
76
|
return;
|
|
77
77
|
}
|
|
78
|
-
|
|
78
|
+
const reference = stringifyReferencePath(joinPath(path));
|
|
79
79
|
objReferenceMap.set(parentObj, reference);
|
|
80
80
|
if (Array.isArray(parentObj)) {
|
|
81
81
|
for (let i = 0; i < parentObj.length; i++) {
|
|
@@ -145,7 +145,7 @@ var stringifyRecursion = (parentObj, objReferenceMap, path) => {
|
|
|
145
145
|
if (typeof parentObj !== "object") {
|
|
146
146
|
return;
|
|
147
147
|
}
|
|
148
|
-
|
|
148
|
+
const reference = stringifyReferencePath(joinPath(path));
|
|
149
149
|
objReferenceMap.set(parentObj, reference);
|
|
150
150
|
if (Array.isArray(parentObj)) {
|
|
151
151
|
for (let i = 0; i < parentObj.length; i++) {
|
package/dist/index.mjs
CHANGED
|
@@ -48,7 +48,7 @@ var parseRecursion = (parentObj, objReferenceMap, pathObjectMap, path, unresolve
|
|
|
48
48
|
if (typeof parentObj !== "object") {
|
|
49
49
|
return;
|
|
50
50
|
}
|
|
51
|
-
|
|
51
|
+
const reference = stringifyReferencePath(joinPath(path));
|
|
52
52
|
objReferenceMap.set(parentObj, reference);
|
|
53
53
|
if (Array.isArray(parentObj)) {
|
|
54
54
|
for (let i = 0; i < parentObj.length; i++) {
|
|
@@ -118,7 +118,7 @@ var stringifyRecursion = (parentObj, objReferenceMap, path) => {
|
|
|
118
118
|
if (typeof parentObj !== "object") {
|
|
119
119
|
return;
|
|
120
120
|
}
|
|
121
|
-
|
|
121
|
+
const reference = stringifyReferencePath(joinPath(path));
|
|
122
122
|
objReferenceMap.set(parentObj, reference);
|
|
123
123
|
if (Array.isArray(parentObj)) {
|
|
124
124
|
for (let i = 0; i < parentObj.length; i++) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "circular-reference",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Tiny util to stringify and parse circular references in objects.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -18,6 +18,8 @@
|
|
|
18
18
|
"keywords": [
|
|
19
19
|
"circular",
|
|
20
20
|
"reference",
|
|
21
|
+
"circularreference",
|
|
22
|
+
"circular-reference",
|
|
21
23
|
"JSON",
|
|
22
24
|
"stringify",
|
|
23
25
|
"parse"
|
|
@@ -28,8 +30,12 @@
|
|
|
28
30
|
"url": "https://github.com/derRaab/circular-reference-js"
|
|
29
31
|
},
|
|
30
32
|
"devDependencies": {
|
|
33
|
+
"@eslint/js": "^9.20.0",
|
|
34
|
+
"eslint": "^9.20.0",
|
|
35
|
+
"globals": "^15.14.0",
|
|
31
36
|
"ts-node": "^10.9.2",
|
|
32
37
|
"tsup": "^8.3.6",
|
|
38
|
+
"typescript-eslint": "^8.23.0",
|
|
33
39
|
"typescript": "^5.7.3"
|
|
34
40
|
}
|
|
35
41
|
}
|