1.0.1 • Published 7 months ago

json-typedefs v1.0.1

Weekly downloads
-
License
-
Repository
-
Last release
7 months ago

json-typedefs

Type definitions for JSON

Types

type JsonPrimitive = string | number | boolean;
interface JsonArray extends Array<JsonValue> {}
interface JsonObject extends Partial<Record<string, JsonValue>> {}
type JsonValue = JsonPrimitive | JsonArray | JsonObject | null;

Functions

function isJsonPrimitive(value: JsonValue): value is JsonPrimitive;
function isJsonArray(value: JsonValue): value is JsonArray;
function isJsonObject(value: unknown): value is JsonObject
function isJsonValue(value: JsonValue): value is JsonValue;

function equals(a: JsonValue, b: JsonValue): boolean;
function clone(value: JsonValue): JsonValue;
1.0.1

7 months ago

1.0.0

7 months ago

0.3.0

9 months ago

0.2.1

10 months ago

0.2.0

10 months ago

0.2.6

10 months ago

0.1.7

10 months ago

0.2.3

10 months ago

0.2.2

10 months ago

0.2.5

10 months ago

0.2.4

10 months ago

0.1.6

1 year ago

0.1.5

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago