Socket
Socket
Sign inDemoInstall

@xylabs/object

Package Overview
Dependencies
Maintainers
5
Versions
92
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xylabs/object - npm Package Compare versions

Comparing version 4.0.9 to 4.0.10

5

dist/neutral/toJson.d.ts

@@ -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

8

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc