Package Exports
- types-json
Readme
Type checking for JSON objects.
If I should maintain this repo, please ⭐️
DM me on Twitter if you have questions or suggestions.
Type checking for JSON objects.
Derived from type-fest with a focus on JSON types.
Installation
yarn add types-jsonnpm install types-jsonAPI
Types
import {
isJSONValue,
isJSONObject,
isJSONArray,
isString,
isNumber,
isBoolean,
isNull,
isUndefined,
JSONObject,
JSONValue,
JSONArray
} from "types-json";
function isJSONValue(object?: JSONValue): boolean;
function isJSONObject(object?: JSONValue): boolean;
function isJSONArray(object?: JSONValue): boolean;
function isString(object?: JSONValue): boolean;
function isNumber(object?: JSONValue): boolean;
function isBoolean(object?: JSONValue): boolean;
function isNull(object?: JSONValue): boolean;
function isUndefined(object?: JSONValue): boolean;
type JSONObject = {
[key in string]?: JSONValue
};
type JSONValue = string | number | boolean | null | JSONObject | JSONArray;
interface JSONArray extends Array<JSONValue> {};Dev Dependencies
- @bconnorwhite/bob: Bob is a toolkit for TypeScript projects
License 
Related Packages
- types-pkg-json: Type checking for package.json
- types-tsconfig: Type checking for tsconfig.json
- types-eslintrc: Type checking for .eslintrc.json
Dev Dependencies
- autorepo: Autorepo abstracts away your dev dependencies, providing a single command to run all of your scripts.