# racks

> Reusable middleware implementation for Node.js & the browsers

Latest version **0.0.1** (published 2012-11-14) · MIT license · 0 weekly downloads

## Install

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

## 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.0.1 |
| Published | 2012-11-14 |
| First published | 2012-11-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.6.0 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Veselin Todorov |
| Maintainers | vesln |
| Keywords | middleware, middlewares |

## Links

- npm: https://www.npmjs.com/package/racks
- Repository: https://github.com/vesln/racks
- npm.io page: https://npm.io/package/racks

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.0.1 (latest) — 2012-11-14

## README

[![Build Status](https://secure.travis-ci.org/vesln/racks.png)](http://travis-ci.org/vesln/racks)

# racks

Reusable middleware implementation for Node.js & the browsers.

## Synopsis

```js
var Racks = require('racks');

var app = new Racks;

// Register middlewares

app.use(function(stuff, next) { // next will always be the last param
  next();
});

app.use(function(stuff, next) {
  next();
});

// Register a function, triggered after each callback

app.after(function(stuff, next) {
  console.log('Called after every single middleware');
  console.log('Useful for debugging or logging');
});

// Trigger

app.send(stuff); // you can pass as much args as you want

```

## Installation

Node.js:

```
$ npm install racks
```

Browser:

Download `racks.min.js`, it's all you need.

```html
<script src="racks.min.js"></script>
```

## Tests

Node.js:

```
$ npm install
$ make test
```

Browser:

- Clone the repository
- Open `test/browser/index.html` in your favourite browser

## License

(The MIT License)

Copyright (c) 2012 Veselin Todorov <hi@vesln.com>

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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