- Made
extractOne
returnundefined
on failure. - Bump adt.js version and update docs.
- Added arbitrary rest expressions. You can combine an ellpsis with any other expression to map said expression over a list.
- Removed strict object comparison. It just wasn't useful, it was brittle, and it didn't make sense when combined with rest expressions. Object are now always non-strict.
- Added a couple more methods (
extract
andextractOne
) for just doing destructuring rather than dispatch. - Consolidated the source code into one file.
- Added rest arguments. Argument length matching is now strict.
- Rest arguments have the identifier after the ellipsis ala ES6.
- Added custom extractors
- Added support for string keys in objects
- Fixed a bug in the compiled functions for objects matching on Object prototype keys.
- Updated adt.js version number
- Removed specific adt.js support in favor of general custom type support.
- Removed hyper-specific tokens from the grammar like
emptyArray
,emptyObject
,arrayRest
, andobjectRest
in favor of compile time checking.
Removed stray debug statement.
Refactored grammar/parser and compiler. Objects now support the same rest syntax as arrays. The key-only or key-value syntax for objects can be mixed and matched in the same pattern.
Initial release