包详细信息

@bconnorwhite/json-types

bconnorwhite53MIT1.0.5

Type checking for json objects

json, object, value, array

自述文件

@bconnorwhite/json-types

dependencies typescript npm

Type checking for json objects

yarn add @bconnorwhite/json-types

API

import { isJSONObject, JSONObject, JSONValue, JSONArray } from "@bconnorwhite/json-types";

isJSONObject(object?: JSONValue): boolean;

type JSONObject = {
  [key in string]?: JSONValue
};

type JSONValue = string | number | boolean | null | JSONObject | JSONArray;

interface JSONArray extends Array<JSONValue> {};

更新日志

4.0.1 (2023-01-29)

4.0.0 (2023-01-27)

3.2.0 (2023-01-27)

Features

3.1.2 (2023-01-24)

Bug Fixes

  • fix NestedOptionalJSONValue type (4728284)

3.1.1 (2023-01-24)

Bug Fixes

  • adjust nested optional types (e61c1ed)

3.1.0 (2023-01-24)

Features

  • add optional and primitive types (ee5844e)

3.0.0 (2023-01-11)

2.0.2 (2023-01-11)

2.0.1 (2023-01-10)

2.0.0 (2023-01-10)

1.2.2 (2020-10-04)

1.2.1 (2020-09-19)

1.2.0 (2020-09-10)

1.1.0 (2020-09-10)

1.0.8 (2020-09-08)

1.0.7 (2020-09-07)

1.0.5 (2020-09-03)

1.0.4 (2020-09-03)

1.0.3 (2020-09-02)

1.0.2 (2020-08-28)

1.0.1 (2020-08-28)