@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

Readme

Keywords

none

Package Sidebar

Install

npm i @gustavofsantos/defn

Weekly Downloads

0

Version

1.0.1

License

ISC

Unpacked Size

2.76 kB

Total Files

9

Last publish

Collaborators

  • gsantos