# hookit

> A function for shimming all node.js core IO calls allowing callback wraping.

Latest version **1.1.3** (published 2015-09-04) · MIT license · 0 weekly downloads

## Install

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

## 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.1.3 |
| Published | 2015-09-04 |
| First published | 2013-03-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | Adam Crabtree |
| Maintainers | crabdude |
| Keywords | hook, wrap, core, io |

## Links

- npm: https://www.npmjs.com/package/hookit
- Repository: https://github.com/CrabDude/hookit
- Issues: https://github.com/CrabDude/hookit/issues
- npm.io page: https://npm.io/package/hookit

## Alternatives

- [memory-cache](https://npm.io/package/memory-cache.md) — 795.0K weekly downloads
- [@httptoolkit/proxy-agent](https://npm.io/package/@httptoolkit/proxy-agent.md) — 11.2K weekly downloads
- [express-cache-controller](https://npm.io/package/express-cache-controller.md) — 5.3K weekly downloads
- [http-cache-middleware](https://npm.io/package/http-cache-middleware.md) — 4.5K weekly downloads
- [cache2](https://npm.io/package/cache2.md) — 1.5K weekly downloads

## Recent versions

- 1.1.3 (latest) — 2015-09-04
- 0.1.3 — 2015-09-04
- 1.1.2 — 2015-09-04
- 1.1.1 — 2015-09-03
- 1.1.0 — 2015-09-01
- 1.0.1 — 2015-09-01
- 1.0.0 — 2015-08-31
- 0.1.2 — 2015-08-31
- 0.1.1 — 2014-03-18
- 0.1.0 — 2013-10-18
- 0.0.6 — 2013-10-18
- 0.0.5 — 2013-08-30
- 0.0.4 — 2013-07-03
- 0.0.3 — 2013-04-05
- 0.0.2 — 2013-03-28

## README

hook
====

Shim all core IO calls and allow callback shimming via wrap function.

###Installation
```
$ npm install hookit
```
###Usage:
```javascript
hookit(function generateShim(callback, fnName) {
  return function() {
    try {
      callback.apply(this, arguments);
    } finally {
      console.log('bummer.')
    }
  }
})

process.nextTick(function() {
  throw new Error('here') // Will log "bummer" before we crash on error
})
```

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