1.0.0 • Published 2 years ago
@suchipi/ts-json-utils v1.0.0
@suchipi/ts-json-utils
Utility types for describing JSON values in TypeScript
Exports
Types
JSONValue(type for any value which is valid in JSON)JSONObject(type for object with string/number keys andJSONValuevalues)JSONArray(type for array ofJSONValue)JSONPrimitive(type for all non-composite values which are valid in JSON)
Functions
parse(re-export ofJSON.parse, but typed as returningJSONValueinstead ofany)stringify(re-export ofJSON.stringify, but typed as acceptingJSONValueinstead ofany)
Installation
npm install --save-dev @suchipi/ts-json-utilsLicense
MIT
1.0.0
2 years ago