v0.0.12
Pre-release
Pre-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/undefinedt.notExists(value)
-value
is null/undefinedt.match(a, b)
- similar tot.deepEqual(a, b)
, but ignoring typest.notMatch(a, b)
- similar tot.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)
, liket.hasMatchKeys(object, keys)
t.notHasMatchAllKeys(object, keys)
, liket.notHasMatchAllKeys(object, keys)
t.hasMatchAnyKeys(object, keys)
, liket.hasMatchAnyKeys(object, keys)
t.notHasMatchKeys(object, keys)
, liket.notHasMatchKeys(object, keys)
t.includesMatch(object, keys)
, liket.includesMatch(object, keys)
t.notIncludesMatchAll(object, keys)
, liket.notIncludesMatchAll(object, keys)
t.includesMatchAny(object, keys)
, liket.includesMatchAny(object, keys)
t.notIncludesMatch(object, keys)
, liket.notIncludesMatch(object, keys)
- New assertion aliases, for consistency:
t.hasMatchLooseKeys
fort.hasLooseDeepKeys
t.notHasMatchLooseAllKeys
fort.notHasLooseDeepKeys
t.hasMatchLooseAnyKeys
fort.hasLooseDeepAnyKeys
t.notHasMatchLooseKeys
fort.notHasLooseDeepKeys
t.includesMatchLoose
fort.includesLooseDeep
t.notIncludesMatchLooseAll
fort.notIncludesLooseDeepAll
t.includesMatchLooseAny
fort.includesLooseDeepAny
t.notIncludesMatchLoose
fort.notIncludesLooseDeep
- Changed assertions:
t.includes*
/t.notIncludes*
TypeScript definitions fixed- Overloads for
t.hasKeys
, etc. accepting an array of keys are now limited to justt.hasKeys
,t.notHasAllKeys
,t.hasAnyKeys
, andt.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