# switchy

> Replace `switch` with switchy.

Latest version **0.1.0** (published 2016-08-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install switchy
pnpm add switchy
yarn add switchy
bun add switchy
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2016-08-19 |
| First published | 2016-08-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | EGOIST |
| Maintainers | kchan |

## Links

- npm: https://www.npmjs.com/package/switchy
- Repository: https://github.com/egoist/switchy
- Homepage: https://github.com/egoist/switchy#readme
- Issues: https://github.com/egoist/switchy/issues
- npm.io page: https://npm.io/package/switchy

## Recent versions

- 0.1.0 (latest) — 2016-08-19

## README

<p align="center">
  <br>Replace <code>switch</code> with <strong>switchy</strong>. <br>http://chimera.labs.oreilly.com/books/1234000000262/apa.html#dont_use_switch
</p>

<p align="center">
  <a href="https://npmjs.com/package/switchy"><img src="https://img.shields.io/npm/v/switchy.svg?style=flat-square" alt="NPM version"></a>
  <a href="https://npmjs.com/package/switchy"><img src="https://img.shields.io/npm/dm/switchy.svg?style=flat-square" alt="NPM downloads"></a>
  <a href="https://circleci.com/gh/egoist/switchy"><img src="https://img.shields.io/circleci/project/egoist/switchy/master.svg?style=flat-square" alt="Build Status"></a>
</p>


## Install

```bash
$ npm install --save switchy
```

## Usage

```js
const switchy = require('switchy')

const chooseFruit = switchy({
  apple() {
    console.log('apple')
  },
  peach() {
    console.log('peach')
  },
  default() {
    console.log('no idea what you want')
  }
})

chooseFruit('apple')
//=> apple
chooseFruit('watermelon')
//=> no idea what you want
```

## License

MIT © [EGOIST](https://github.com/egoist)

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