An open API service indexing awesome lists of open source software.

https://github.com/archergu/check-package-exists

Check if the npm package exists
https://github.com/archergu/check-package-exists

function npm packages tiny

Last synced: 2 months ago
JSON representation

Check if the npm package exists

Awesome Lists containing this project

README

          

# ✅ Check Package Exists

[![npm](https://img.shields.io/npm/v/check-package-exists?style=flat-square)](https://npm.im/check-package-exists) [![npm](https://img.shields.io/npm/dw/check-package-exists?style=flat-square)](https://npm.im/check-package-exists) [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/ArcherGu/check-package-exists/ci.yml?style=flat-square)](https://github.com/ArcherGu/check-package-exists/actions/workflows/ci.yml)

Check if the npm package exists.

## ⚙️ Install

```bash
npm i check-package-exists
# Or Yarn
yarn add check-package-exists
# Or PNPM
pnpm add check-package-exists
```

## 📖 Usage

```ts
import { checkPackageExists } from 'check-package-exists'

console.log(checkPackageExists('some-package')) // true or false
```

## 📄 License

MIT License © 2022 [Archer Gu](https://github.com/archergu)