# @f/to-middleware

> Convert a function redux style middleware.

Latest version **1.0.1** (published 2016-01-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install @f/to-middleware
pnpm add @f/to-middleware
yarn add @f/to-middleware
bun add @f/to-middleware
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2016-01-28 |
| First published | 2016-01-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | f |

## Links

- npm: https://www.npmjs.com/package/@f/to-middleware
- Repository: https://github.com/micro-js/to-middleware
- Homepage: https://github.com/micro-js/to-middleware#readme
- Issues: https://github.com/micro-js/to-middleware/issues
- npm.io page: https://npm.io/package/@f/to-middleware

## Dependencies (1)

- [@f/bind-middleware](https://npm.io/package/@f/bind-middleware.md) ^1.1.1

## Recent versions

- 1.0.1 (latest) — 2016-01-28
- 1.0.0 — 2016-01-28

## README

# to-middleware

[![Build status][travis-image]][travis-url]
[![Git tag][git-image]][git-url]
[![NPM version][npm-image]][npm-url]
[![Code style][standard-image]][standard-url]

Convert a function redux style middleware.

## Installation

    $ npm install @f/to-middleware

## Usage

```js
var toMiddleware = require('@f/to-middleware')
var bind = require('@f/bind-middleware')

var addOne = bind([toMiddleware(add)])

addOne(1) // => 2

function add (v) {
  return v + 1
}

```

## API

### toMiddleware(fn, type)

- `fn` - unary function to use in middleware
- `type` - type to match on - if matched payload is passed to fn - if not present action is passed to fn

**Returns:**

## License

MIT

[travis-image]: https://img.shields.io/travis/micro-js/to-middleware.svg?style=flat-square
[travis-url]: https://travis-ci.org/micro-js/to-middleware
[git-image]: https://img.shields.io/github/tag/micro-js/to-middleware.svg
[git-url]: https://github.com/micro-js/to-middleware
[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat
[standard-url]: https://github.com/feross/standard
[npm-image]: https://img.shields.io/npm/v/@f/to-middleware.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@f/to-middleware

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