@bconnorwhite/json-types

1.0.5 • Public • Published

@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> {};

Package Sidebar

Install

npm i @bconnorwhite/json-types

Weekly Downloads

16

Version

1.0.5

License

MIT

Unpacked Size

1.84 kB

Total Files

6

Last publish

Collaborators

  • bconnorwhite