Comparing version 0.3.2 to 0.3.3
{ | ||
"name": "typa", | ||
"description": "Super-simple, zero-dependency JavaScript type checker utility.", | ||
"version": "0.3.2", | ||
"version": "0.3.3", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "files": [ |
@@ -5,3 +5,3 @@ # Typa: Zero-dep JS type checker 🧐 | ||
The easy-peasy zero-dependency JavaScript type checker that asks, "What typa input is that?" | ||
The easy-peasy zero-dependency JavaScript type checker that asks, "What typa input is that?" Minified packaged version is 2 entire KB. | ||
@@ -167,6 +167,7 @@ **Notice:** Breaking changes in v0.3.0. New bundler, plus `nll` is now `nil` and `noru` is now `nullish`. | ||
<a name="json"></a>**.json**(\$value) — Serialized JSON object | ||
<a name="json"></a>**.json**(\$value, \$type ['str'|'obj']) — Serialized JSON object | ||
```js | ||
const isJson = is.json('{"key": "value"}') | ||
const isJson = is.json({ key: 'value' }, 'obj') | ||
// => true | ||
@@ -173,0 +174,0 @@ ``` |
49927
268