Skip to content

Releases: deno911/dis

0.2.0

27 Nov 04:40
0.2.0
de688c7
Compare
Choose a tag to compare

🆕 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/collection
  • is.value: ensure value exists in object/array/collection
  • is.propertyDescriptor: generic PropertyDescriptor type
  • is.accessorDescriptor: accessor props with getters/setters
  • is.dataDescriptor: standard props with value
  • is.request: HTTP Request
  • is.response: HTTP Response
  • is.headers: HTTP Headers
  • is.url: URL string / URL instance
  • is.every: alias to is.all
  • is.some: alias to is.any
  • is.none: negated version of is.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/dis@0.2.0/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, and is.class
  • enumerability issue w/ is.assert (mirror of the assert export)
  • compilerOptions conundrum with keyOfStringsOnly >_>
  • some other stuff...

0.1.0

27 Nov 04:32
0.1.0
431be73
Compare
Choose a tag to compare

Full Changelog: 0.0.1...0.1.0

0.0.1

07 Aug 02:47
0.0.1
27b0388
Compare
Choose a tag to compare

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