Skip to content

v0.0.12

Pre-release
Pre-release
Compare
Choose a tag to compare
@dead-claudia dead-claudia released this 02 Apr 01:18
· 433 commits to master since this release

Changes since v0.0.11

npm release is not broken

Changes since v0.0.9

  • New assertions:
    • t.exists(value) -value is not null/undefined
    • t.notExists(value) - value is null/undefined
    • t.match(a, b) - similar to t.deepEqual(a, b), but ignoring types
    • t.notMatch(a, b) - similar to t.notDeepEqual(a, b), but ignoring types
    • Assertions with identical matching behavior to t.match(a, b) have been added for others, with corresponding TypeScript definitions:
      • t.hasMatchKeys(object, keys), like t.hasMatchKeys(object, keys)
      • t.notHasMatchAllKeys(object, keys), like t.notHasMatchAllKeys(object, keys)
      • t.hasMatchAnyKeys(object, keys), like t.hasMatchAnyKeys(object, keys)
      • t.notHasMatchKeys(object, keys), like t.notHasMatchKeys(object, keys)
      • t.includesMatch(object, keys), like t.includesMatch(object, keys)
      • t.notIncludesMatchAll(object, keys), like t.notIncludesMatchAll(object, keys)
      • t.includesMatchAny(object, keys), like t.includesMatchAny(object, keys)
      • t.notIncludesMatch(object, keys), like t.notIncludesMatch(object, keys)
  • New assertion aliases, for consistency:
    • t.hasMatchLooseKeys for t.hasLooseDeepKeys
    • t.notHasMatchLooseAllKeys for t.notHasLooseDeepKeys
    • t.hasMatchLooseAnyKeys for t.hasLooseDeepAnyKeys
    • t.notHasMatchLooseKeys for t.notHasLooseDeepKeys
    • t.includesMatchLoose for t.includesLooseDeep
    • t.notIncludesMatchLooseAll for t.notIncludesLooseDeepAll
    • t.includesMatchLooseAny for t.includesLooseDeepAny
    • t.notIncludesMatchLoose for t.notIncludesLooseDeep
  • Changed assertions:
    • t.includes*/t.notIncludes* TypeScript definitions fixed
    • Overloads for t.hasKeys, etc. accepting an array of keys are now limited to just t.hasKeys, t.notHasAllKeys, t.hasAnyKeys, and t.notHasKeys. The rest just accept objects, and the TypeScript definitions have been updated to reflect this.
    • The TypeScript definitions for t.hasKeys and friends now accept any object, not just those with indexable keys.
    • Where an object key is required, the type is consistent across all assertions.
  • Many internal improvements