JSPM

@bconnorwhite/json-types

1.0.5
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 18
  • Score
    100M100P100Q64872F
  • License MIT

Type checking for json objects

Package Exports

  • @bconnorwhite/json-types

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@bconnorwhite/json-types) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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