# node-require-fallback

> Require another package in Node.js if your first choice doesn't exist.

Latest version **1.0.0** (published 2017-02-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install node-require-fallback
pnpm add node-require-fallback
yarn add node-require-fallback
bun add node-require-fallback
```

## 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 | 2017-02-07 |
| First published | 2016-05-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 6 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Fabian Pirklbauer |
| Maintainers | fabiandev |
| Keywords | node, require, fallback |

## Links

- npm: https://www.npmjs.com/package/node-require-fallback
- Repository: https://github.com/fabiandev/node-require-fallback
- Homepage: https://github.com/fabiandev/node-require-fallback#readme
- Issues: https://github.com/fabiandev/node-require-fallback/issues
- npm.io page: https://npm.io/package/node-require-fallback

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2017-02-07
- 0.1.2 — 2016-11-16
- 0.1.1 — 2016-06-16
- 0.1.0 — 2016-05-29

## README

# node-require-fallback

Require another package in Node.js if your first choice doesn't exist.

Useful for development, where you want to use a local copy of your package,
but it shouldn't break the application for your team, which is depending on a
npm package.

# Installation

```bash
npm install --save node-require-fallback
```

> Node.js >= 6 is required for this package.

# Example Usage

```javascript
var requireIfExists = require('node-require-fallback');

var myModule = requireIfExists('./module1', 'module2', 'module3');
```

You can pass as many modules to `requireIfExists` as you want.
The first one that can be found will be loaded, otherwise `null`
will be returned.

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