@xylabs/object
Advanced tools
Comparing version 4.0.9 to 4.0.10
@@ -1,4 +0,7 @@ | ||
import type { JsonValue } from './JsonObject.ts'; | ||
import type { JsonArray, JsonObject, JsonValue } from './JsonObject.ts'; | ||
export declare const toJsonArray: (value: unknown[], cycleList?: unknown[], maxDepth?: number) => JsonArray; | ||
export declare const toJsonObject: (value: object, cycleList?: unknown[], maxDepth?: number) => JsonObject; | ||
export declare const toJsonValue: (value: unknown, cycleList?: unknown[], maxDepth?: number) => JsonValue; | ||
export declare const toJsonString: (value: unknown, maxDepth?: number) => string; | ||
export declare const toJson: (value: unknown, maxDepth?: number) => JsonValue; | ||
//# sourceMappingURL=toJson.d.ts.map |
{ | ||
"name": "@xylabs/object", | ||
"version": "4.0.9", | ||
"version": "4.0.10", | ||
"description": "Primary SDK for using XYO Protocol 2.0", | ||
@@ -32,5 +32,5 @@ "homepage": "https://xyo.network", | ||
"dependencies": { | ||
"@xylabs/assert": "^4.0.9", | ||
"@xylabs/logger": "^4.0.9", | ||
"@xylabs/promise": "^4.0.9" | ||
"@xylabs/assert": "^4.0.10", | ||
"@xylabs/logger": "^4.0.10", | ||
"@xylabs/promise": "^4.0.10" | ||
}, | ||
@@ -37,0 +37,0 @@ "devDependencies": { |
@@ -5,7 +5,7 @@ import type { | ||
const toJsonArray = (value: unknown[], cycleList?: unknown[], maxDepth = 3): JsonArray => { | ||
export const toJsonArray = (value: unknown[], cycleList?: unknown[], maxDepth = 3): JsonArray => { | ||
return value.map(item => toJsonValue(item, cycleList, maxDepth)) | ||
} | ||
const toJsonObject = (value: object, cycleList?: unknown[], maxDepth = 3): JsonObject => { | ||
export const toJsonObject = (value: object, cycleList?: unknown[], maxDepth = 3): JsonObject => { | ||
const result: JsonObject = {} | ||
@@ -18,3 +18,3 @@ for (const [key, entry] of Object.entries(value)) { | ||
const toJsonValue = (value: unknown, cycleList?: unknown[], maxDepth = 3): JsonValue => { | ||
export const toJsonValue = (value: unknown, cycleList?: unknown[], maxDepth = 3): JsonValue => { | ||
if (maxDepth <= 0 && typeof value === 'object') { | ||
@@ -21,0 +21,0 @@ return '[MaxDepth]' |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
110205
902
Updated@xylabs/assert@^4.0.10
Updated@xylabs/logger@^4.0.10
Updated@xylabs/promise@^4.0.10