# is-npm-module

> test whether a string is a public npm module

Latest version **1.0.0** (published 2015-04-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install is-npm-module
pnpm add is-npm-module
yarn add is-npm-module
bun add is-npm-module
```

## 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 | 2015-04-26 |
| First published | 2015-04-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Matt DesLauriers |
| Maintainers | mattdesl |
| Keywords | test, module, modules, public, npm, database, registry, require, requires, statement, on, is |

## Links

- npm: https://www.npmjs.com/package/is-npm-module
- Repository: https://github.com/mattdesl/is-npm-module
- Issues: https://github.com/mattdesl/is-npm-module/issues
- npm.io page: https://npm.io/package/is-npm-module

## Dependencies (2)

- [builtins](https://npm.io/package/builtins.md) ^1.0.1
- [npm-stats](https://npm.io/package/npm-stats.md) ^1.1.0

## 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) — 2015-04-26

## README

# is-npm-module

[![experimental](http://badges.github.io/stability-badges/dist/experimental.svg)](http://github.com/badges/stability-badges)

Test whether the given name is a public npm module.

```js
var isModule = require('is-npm-module')

isModule('object-assign', function(err, exists) {
  if (err) {
    console.error("Could not connect to database")
    return
  }
  
  console.log(exists) // -> true
})
```

Builtins like `"url"` will not query the database.

## Usage

[![NPM](https://nodei.co/npm/is-npm-module.png)](https://www.npmjs.com/package/is-npm-module)

#### `isModule(name, cb)`

Tests whether `name` exists in the public npm database. The callback is provided with `(err, exists)` parameters; where `err` is an Error if there was a problem connecting to the database, otherwise `exists` is a boolean for whether the module was found in the database. 

## License

MIT, see [LICENSE.md](http://github.com/mattdesl/is-npm-module/blob/master/LICENSE.md) for details.

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