Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jeetiss/is-this-module
https://github.com/jeetiss/is-this-module
Last synced: 12 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/jeetiss/is-this-module
- Owner: jeetiss
- Created: 2020-07-27T12:05:09.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-07-28T17:04:20.000Z (over 4 years ago)
- Last Synced: 2024-10-19T22:33:47.723Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 4.88 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# is this module
Tiny module type checker
* **useless** ðĪŠ
* supports **es** and **commonjs** modules
* works in **node** and **browser**## usage
```js
// node v14
import { isEsm, isCjs } from 'is-this-module'console.log(isEsm) // true
console.log(isCjs) // false
``````js
// node v12
const { isEsm, isCjs } = require('is-this-module')console.log(isEsm) // false
console.log(isCjs) // true
```## install
```
npm i is-this-module
```## example
[sandbox](https://codesandbox.io/s/is-this-module-example-603ff)