Releases: haltcase/param.macro
v3.2.1
v3.2.0
v3.1.0
v3.0.0
This release improves the expected results of the macro. There is a breaking
change but if you weren't using it
within tagged template expressions,
you're probably in the clear!
BREAKING CHANGES
- The output has changed when placeholders are used within tagged template
expressions.foo`${it}`
will now replace theit
in place rather
than wrap the entire tagged template expression.
FEATURES
BUG FIXES
v2.1.0
And now for a totally backward compatible but no less ground-breaking release 🎉.
A third export is now available called lift
that allows for more flexible placeholder usage, making it possible to define inline functions with more than one argument.
See the new section in the readme for more information.
PLAYGROUND
The online playground now supports shareable permalinks! The URL in your address bar is automatically updated as you type or when you use a code block from the readme — just copy it and share it to send examples like this one:
Example of the new lift
modifier
FEATURES
- add
lift()
modifier to support binary+ functions (f92542c
)
v2.0.0
PLAYGROUND
The online playground received a pretty major upgrade:
- contains all new features of
param.macro
- supports all current features of Babel (pipeline operator, optional catch binding, etc — see here for more)
- it's now smaller & more efficient since minification's been restored
FEATURES
- include tail paths, support spread, default params (
8a47350
)
BREAKING CHANGES
spread placeholders
Input:
import { _ } from 'param.macro'
const log = console.log(..._)
Output (before):
const log = (_arg) => {
return console.log(..._arg);
};
Output (after):
const log = (..._arg) => {
return console.log(..._arg);
};
tail paths
Input:
import { _ } from 'param.macro'
const fn = String(_).toUpperCase() === 'HELLO'
Output (before):
const fn = (_arg => {
return String(_arg)
}).toUpperCase() === 'HELLO'
Output (after):
const fn = _arg => {
return String(_arg).toUpperCase() === 'HELLO'
}