# @gustavofsantos/defn

> Utilitary function to define functions with multiple implementations.

Latest version **1.0.1** (published 2021-12-08) · ISC license · 0 weekly downloads

## Install

```sh
npm install @gustavofsantos/defn
pnpm add @gustavofsantos/defn
yarn add @gustavofsantos/defn
bun add @gustavofsantos/defn
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2021-12-08 |
| First published | 2021-12-08 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Gustavo Santos |
| Maintainers | gsantos |

## Links

- npm: https://www.npmjs.com/package/@gustavofsantos/defn
- npm.io page: https://npm.io/package/@gustavofsantos/defn

## Recent versions

- 1.0.1 (latest) — 2021-12-08
- 1.0.0 — 2021-12-08

## README

# 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.

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

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

---
_Source: https://npm.io/package/@gustavofsantos/defn · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
