# wirf

> Create an object that throws whenever it is accessed in any way.

Latest version **1.0.1** (published 2018-03-20) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2018-03-20 |
| First published | 2018-03-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 172 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | robin-drexler |

## Links

- npm: https://www.npmjs.com/package/wirf
- Repository: https://github.com/robin-drexler/wirf
- Homepage: https://github.com/robin-drexler/wirf#readme
- Issues: https://github.com/robin-drexler/wirf/issues
- npm.io page: https://npm.io/package/wirf

## Recent versions

- 1.0.1 (latest) — 2018-03-20
- 1.0.0-alpha.1 (next) — 2018-03-20
- 1.0.0 — 2018-03-20

## README

# wirf

** ⚠️ This lib depends on es6 proxy support ⚠️ **

Please check your browser/node matrix before using it.

Create an object that throws whenever it is accessed in any way.

```js
import wirf from 'wirf';
const willThrow = wirf('please do not use');

willThrow.foo; // throws please do not use
willThrow.foo = 1; // throws please do not use

willThrow(); // throws please do not use
willThrow[0]; // throws please do not use
```

# why?

Can be used instead of https://github.com/robin-drexler/react-ensure-provider to create a default value for react contexts that provides a meaningful error when `Context.Consumer` is rendered outside `Context.Provider`.

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