https://github.com/kristiyan-velkov/js-module-exists
Checks if a node module or file exists or not in the repository.
https://github.com/kristiyan-velkov/js-module-exists
Last synced: about 1 month ago
JSON representation
Checks if a node module or file exists or not in the repository.
- Host: GitHub
- URL: https://github.com/kristiyan-velkov/js-module-exists
- Owner: kristiyan-velkov
- License: mit
- Created: 2022-08-10T07:34:36.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-02-22T08:57:45.000Z (over 1 year ago)
- Last Synced: 2025-05-07T12:55:24.885Z (about 1 month ago)
- Language: JavaScript
- Size: 4.44 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
![]()
[](https://github.com/kristiyan-velkov) [](https://github.com/kristiyan-velkov) [](https://choosealicense.com/licenses/mit/) [](https://nodejs.org/en/)
JS Module Exists
**Checks if an es module/ npm package exists in package.json file and returns a boolean value.**
## Table of contents
- [Installation 🦾](#installation)
- [How to Use? 💻](#how-to-use)
- [Examples 🚀](#examples)
- [Developer Support 🔗 ](#developer-support)
- [Support my work ❤️ ](#support-my-work)---
## Installation
- Via npm:
```code
npm install js-module-exists --save-dev```
- Via yarn:
```code
yarn add -D js-module-exists```
## How to use?
#### API
| Method | Usage |
| ------------------ | --------------------------------------------------------------------------------------------- |
| **moduleExists()** | Еasy to use a method that will return a boolean value after checking the module/ npm package. |1. **moduleExists() method**
- Accepts string and returns a boolean value.
```js
import { moduleExists } from "js-module-exists";if (moduleExists("some-npm-package-name")) {
//=> true
} else {
//=> false
}
```## Developer Support:
- If you saw some issue/bug 🐛 related to the specific release version.
- If you want some new feature or change to be added/implemented. 😊Please, contact the creator of the **js-module-exists**, so he will be able to fix or improve it:
**Kristiyan Velkov**
**Email:** [email protected]
[](https://www.linkedin.com/in/kristiyan-velkov-763130b3/)
[](https://github.com/christiyan14)
## Support my work
If you like my work and want to support me to work hard, please donate via:
| Revolut | Buy me a coffee |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
||
|
Thanks a bunch for supporting me! It means a LOT 😍
---
Copyright ©️2024. All rights reserved.