# methodmissing

> create method missing captureable object

Latest version **0.0.3** (published 2014-06-17) · MIT license · 0 weekly downloads

## Install

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

## 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.3 |
| Published | 2014-06-17 |
| First published | 2013-10-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 8 |
| Author | geta6 |
| Maintainers | geta6 |
| Keywords | method, missing |

## Links

- npm: https://www.npmjs.com/package/methodmissing
- Repository: https://github.com/geta6/node-methodmissing
- Issues: https://github.com/geta6/node-methodmissing/issues
- npm.io page: https://npm.io/package/methodmissing

## Dependencies (1)

- [node-proxy](https://npm.io/package/node-proxy.md) *

## Recent versions

- 0.0.3 (latest) — 2014-06-17
- 0.0.2 — 2014-06-17
- 0.0.1 — 2013-10-06

## README

node-methodmissing
==================

capture method missing in node.js

install
-------

```
npm i methodmissing
```

usage
-----

### inherits method missing

```javascript
mm = require('methodmissing');
fs = require('fs');
mmfs = mm(fs);

mmfs.existsSync('.');  // true
mmfs.existSync('.');   // missing
```

### require with method missing

```javascript
mm = require('methodmissing');
fs = mm('fs');

fs.existsSync('.');  // true
fs.existSync('.');   // missing
```

mm(object, callback)
--------------------

#### object [ string | object ]

* `string`: returns required object inherited method missing
* `object`: returns object inherited method missing

#### callback [ function (key, arg) ]

* called on missing method called

```js
var mm = require('methodmissing');
var fs = mm('fs', function (key, arg) {
  console.log(key + " missing");
});

fs.existsSync('.');  // true, callback not called

fs.existSync('.');   // undefined, callback called [1]

// key:  'existSync'
// arg:  { '0': '.' }
```

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