@dot-event/alias
v0.0.9
Published
dot-event argument aliases
Downloads
22
Readme
@dot-event/alias
Install
npm install dot-event @dot-event/alias
Setup
const dot = require("dot-event")()
require("@dot-event/alias")(dot)
Usage
Add argument aliases using dot.alias
:
export default function(dot) {
dot.alias("myEvent", {
deploy: ["d", "de"],
})
dot.any("myEvent", function(prop, { d, de, deploy }) {
// d, de, and deploy should have same value
})
}
Always call dot.alias
before defining the event, never after.