@gustavofsantos/defn

1.0.1 • Public • Published

defn

Utilitary function to define functions with multiple implementations.

Getting Started

Install this package using your favorite package manager:

$ npm i @gustavofsantos/defn

Then define your first variadic function.

const greet = defn(
  () => "Hello you",
  (name) => `Hello, ${name}`
)

greet() // Hello you
greet('Gustavo') // Hello, Gustavo

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    1
  • 1.0.0
    0

Package Sidebar

Install

npm i @gustavofsantos/defn

Weekly Downloads

1

Version

1.0.1

License

ISC

Unpacked Size

2.76 kB

Total Files

9

Last publish

Collaborators

  • gsantos