Socket
Socket
Sign inDemoInstall

@ark/util

Package Overview
Dependencies
Maintainers
0
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ark/util - npm Package Compare versions

Comparing version 0.13.0 to 0.14.0

2

out/registry.d.ts

@@ -1,2 +0,2 @@

export declare const arkUtilVersion = "0.13.0";
export declare const arkUtilVersion = "0.14.0";
export declare const initialRegistryContents: {

@@ -3,0 +3,0 @@ version: string;

@@ -8,3 +8,3 @@ import { domainOf } from "./domain.js";

// For now, we assert this matches the package.json version via a unit test.
export const arkUtilVersion = "0.13.0";
export const arkUtilVersion = "0.14.0";
export const initialRegistryContents = {

@@ -11,0 +11,0 @@ version: arkUtilVersion,

@@ -8,2 +8,3 @@ import type { array } from "./arrays.ts";

onUndefined?: string;
onBigInt?: (value: bigint) => string;
};

@@ -23,3 +24,3 @@ export type Json = JsonObject | JsonArray;

};
type snapshotPrimitive<t> = t extends undefined ? "(undefined)" : t extends bigint ? `${t}n` : t extends symbol ? `Symbol(${string})` : t;
type snapshotPrimitive<t> = t extends symbol ? `(Symbol${string})` : t;
export declare const print: (data: unknown, indent?: number) => void;

@@ -26,0 +27,0 @@ export declare const printable: (data: unknown, indent?: number) => string;

import { domainOf } from "./domain.js";
import { serializePrimitive } from "./primitive.js";
import { register } from "./registry.js";
export const snapshot = (data, opts = { onUndefined: "(undefined)" }) => _serialize(data, opts, []);
export const snapshot = (data, opts = {}) => _serialize(data, {
onUndefined: `$ark.undefined`,
onBigInt: n => `$ark.bigint-${n}`,
...opts
}, []);
export const print = (data, indent) => console.log(printable(data, indent));

@@ -50,3 +54,3 @@ export const printable = (data, indent) => {

case "bigint":
return `${data}n`;
return opts.onBigInt?.(data) ?? `${data}n`;
case "undefined":

@@ -53,0 +57,0 @@ return opts.onUndefined ?? "undefined";

{
"name": "@ark/util",
"version": "0.13.0",
"version": "0.14.0",
"author": {

@@ -5,0 +5,0 @@ "name": "David Blass",

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