Releases: deno911/dis
Releases · deno911/dis
0.2.0
🆕 Typechecks + Assertions
Note - each of these new checks has an accompanying
assert.{x}
method of the same name.
is.entry
: for singleton pairs -[key, value]
is.entries
: for groups of pairs -[key, value][]
is.key
: ensure key exists in object/array/collectionis.value
: ensure value exists in object/array/collectionis.propertyDescriptor
: generic PropertyDescriptor typeis.accessorDescriptor
: accessor props with getters/settersis.dataDescriptor
: standard props withvalue
is.request
: HTTP Requestis.response
: HTTP Responseis.headers
: HTTP Headersis.url
: URL string / URL instanceis.every
: alias tois.all
is.some
: alias tois.any
is.none
: negated version ofis.any
/is.all
is.sparseArray
: arrays where[].filter(Boolean).length != [].length
Assertions now available as is.assert
All of the new methods above are accompanied by an assertion counterpart. Furthermore, all assertions have been aliased under the assert
property of the main is
export., meaning you can now use all of this module's features with a single import statement:
import is from "https://deno.land/x/[email protected]/mod.ts";
is("deno911") // => "string"
is.numericString("100") // => true
is.assert.numericString("oh no!") // => TypeError
🚧 Deprecated Methods
is.function_
is.null_
is.class_
is.NaN
🐛 Bug Fixes
- enumerability issue w/
is.function
,is.null
, andis.class
- enumerability issue w/
is.assert
(mirror of the assert export) - compilerOptions conundrum with
keyOfStringsOnly
>_> - some other stuff...
0.1.0
Full Changelog: 0.0.1...0.1.0
0.0.1
Initial Release: 0.0.1
Check it out at https://deno.land/x/dis!
Full Changelog: https://github.com/nberlette/dis/commits/0.0.1