Comparing version 0.1.1 to 1.0.0
@@ -15,3 +15,3 @@ "use strict"; | ||
case Object: | ||
const l = Object.entries(value).length; | ||
const l = Object.keys(value).length; | ||
l ? 'object {} with ' + l + ' props' : 'empty object'; | ||
@@ -18,0 +18,0 @@ case Array: return value.length ? 'Array with ' + value.length + ' items' : 'empty array'; |
{ | ||
"name": "blork", | ||
"description": "Blork! Mini (non-static) argument checking in Javascript", | ||
"version": "0.1.1", | ||
"version": "1.0.0", | ||
"license": "0BSD", | ||
@@ -6,0 +6,0 @@ "author": "Dave Houlbrooke <dave@shax.com>", |
@@ -183,8 +183,8 @@ # Blork! Mini (non-static) argument checking in Javascript | ||
- `'array'` or `'arr'` — An instance of **Array** | ||
- `'array+'` or `'arr+'` — An instance of **Array** with one or more entries | ||
- `'array+'` or `'arr+'` — An instance of **Array** with one or more items | ||
- `'map'` — An instance of **Map** | ||
- `'map+'` — An instance of **Map** with one or more entries | ||
- `'map+'` — An instance of **Map** with one or more items | ||
- `'weakmap'` — An instance of **WeakMap** | ||
- `'set'` — An instance of **Set** | ||
- `'set+'` — An instance of **Set** with one or more entries | ||
- `'set+'` — An instance of **Set** with one or more items | ||
- `'weakset'` — An instance of **WeakSet* | ||
@@ -191,0 +191,0 @@ - `'arguments'` or `'args'` — An **arguments** object (i.e. an object with a numeric **length** property, not an array) |
@@ -24,3 +24,3 @@ import { CheckerFunction } from './types'; | ||
{ | ||
case Object: const l = Object.entries(value).length; l ? 'object {} with ' + l + ' props' : 'empty object'; | ||
case Object: const l = Object.keys(value).length; l ? 'object {} with ' + l + ' props' : 'empty object'; | ||
case Array: return value.length ? 'Array with ' + value.length + ' items' : 'empty array'; | ||
@@ -27,0 +27,0 @@ case Map: case Set: return value.size ? 'empty ' + value.constructor.name : value.constructor.name + ' with ' + value.size + ' items'; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
63093