# weird-instanceof

> Call your functions using instanceof operator (drunk programming only)

Latest version **1.0.0** (published 2018-12-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install weird-instanceof
pnpm add weird-instanceof
yarn add weird-instanceof
bun add weird-instanceof
```

## 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.0 |
| Published | 2018-12-10 |
| First published | 2018-12-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Mark Amiraghyan |
| Maintainers | jncmark |
| Keywords | weird, instanceof, wtf, js, javascript, weirdness, superweird, drunk, programming, prog |

## Links

- npm: https://www.npmjs.com/package/weird-instanceof
- Repository: https://github.com/JNCMark/weird-instanceof
- Homepage: https://github.com/JNCMark/weird-instanceof#readme
- Issues: https://github.com/JNCMark/weird-instanceof/issues
- npm.io page: https://npm.io/package/weird-instanceof

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.0.0 (latest) — 2018-12-10

## README

# Weird Instanceof 🍻 
Call your functions using instanceof operator (drunk programming only).  <br/>
This is based on `Symbol.hasInstance` hook of ES6, so this is not compilable to ES5.  <br/>
When I understood this is possible, I just had to create this package 😁.

## Installation 💿
`npm i weird-instanceof` for Node.js  <br/>
`<script src="https://cdn.jsdelivr.net/npm/weird-instanceof@latest/browsers.js"></script>` for Browsers  <br/>

## API 🐱‍👤
Well, this works like this:
```js
const WeirdInstanceof = require('weird-instanceof'); // Global 'WeirdInstanceof' is defined for browsers

const SuperAmazingCuttingEdgeFunction = WeirdInstanceof(arg => {
    console.log(`State-of-art ${arg}`);
    return true;
});

1 instanceof SuperAmazingCuttingEdgeFunction; // State-of-art 1; true

`abc` instanceof SuperAmazingCuttingEdgeFunction; // State-of-art 2; true

{} instanceof SuperAmazingCuttingEdgeFunction; // State-of-art {}; true
```

That's it, thanks! 👾

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