@dot-event/alias

0.0.9 • Public • Published

@dot-event/alias

dot-event argument aliases

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.

Package Sidebar

Install

npm i @dot-event/alias

Weekly Downloads

1

Version

0.0.9

License

MIT

Unpacked Size

5.05 kB

Total Files

5

Last publish

Collaborators

  • winton