Releases: andrejewski/tagmeme
Releases · andrejewski/tagmeme
Tagmeme used Harden
This release was all about making sure Tagmeme is robust to Object.prototype nonsense and empty strings. See PR #19 for more details.
Enter safeUnion and Union.matcher
Data-oriented
Publish ES5
Tagmeme is now published as a ES5 package so build tools work better.
See PR #11 for details.
Hard Break: Practically
Good thing this is 0.x, because this is a huge rewrite. Now only namedUnion
and namedMatch
are available, now called union
and match
. See #8 for details.
import {union} from 'tagmeme'
const Result = union(['Ok', 'Err'])
const good = Result.match(Result.Ok(8), {
Ok: () => "Yes",
Err: () => "No"
})
Invariable Errors
This release:
- Introduces
invariant
for better stack traces to show you more closely where your error is within Tagmeme. - Fixes some incorrect error messages, and now prints the named of missing tags if you don't have a catch-all.
Experiment: namedUnion
This release adds tag.namedUnion
, a little helper to cut down on some potential repetition in defined large tag unions. This release also includes more and better errors.
Clear errors
This patch fixes a misleading error message and also adds more testing around which error is thrown for particular cases.
Proving Travis
This patch release makes sure I setup Travis publishing correctly.