Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/component/is-module
https://github.com/component/is-module
Last synced: 13 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/component/is-module
- Owner: component
- License: mit
- Created: 2014-10-29T09:36:31.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2022-12-30T17:22:05.000Z (almost 2 years ago)
- Last Synced: 2024-12-08T12:34:46.950Z (20 days ago)
- Language: JavaScript
- Size: 113 KB
- Stars: 11
- Watchers: 3
- Forks: 6
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Is Module
Check whether a source string looks like an ES6 module.
This doesn't actually execute the code,
and doesn't check other module types.
So source strings without any module loaders returns `false`.This is just what I need from https://github.com/yahoo/js-module-formats, which actually executes the sauce string in a subcontext.
## API
```js
var isES6Module = require('is-module');console.log(isES6Module('import * from "emitter";')) // => true
```