# max-api-or-not

> Error-free N4M outside of Max

Latest version **1.2.0** (published 2020-02-07) · CC-BY-4.0 license · 0 weekly downloads

## Install

```sh
npm install max-api-or-not
pnpm add max-api-or-not
yarn add max-api-or-not
bun add max-api-or-not
```

## 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.2.0 |
| Published | 2020-02-07 |
| First published | 2020-01-21 |
| Weekly downloads | 0 |
| License | CC-BY-4.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 1.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Dimitri Aatos Ellinas |
| Maintainers | dimitriaatos |
| Keywords | max, max/msp, n4m, cycling' 74, node for max, node.script, max-api |

## Links

- npm: https://www.npmjs.com/package/max-api-or-not
- Repository: https://github.com/dimitriaatos/max-api-or-not
- Issues: https://github.com/dimitriaatos/max-api-or-not/issues
- npm.io page: https://npm.io/package/max-api-or-not

## Recent versions

- 1.2.0 (latest) — 2020-02-07
- 1.1.1 — 2020-02-06
- 1.1.0 — 2020-02-05
- 1.0.1 — 2020-01-21
- 1.0.0 — 2020-01-21

## README

# Max API or Not
A module that allows error-free running of *Node for Max* scripts, that use `max-api`, outside of *Cycling '74's Max*. Meant to be loaded instead of `max-api`.

## Installation
`npm install max-api-or-not`

## How it works
When `max-api-or-not` is required in a script run by a `[node.script]` object, it returns the `max-api`. When loaded on other environments, where `max-api` is absent, `max-api-or-not` will export an object that is identical to `max-api`, concerning structure and types, but has no functionality.

## Features
- `Max.post` triggers a `console.log`
- `max-api-or-not` has an extra element called `noMax` that is `true` when it is called outside of Max and `undefined` in Max.

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