https://github.com/revan-zhang/is-native-modules
:ghost: :sparkles: Checking the JS module is native or not.Using the `process.binding` to connect with c++
https://github.com/revan-zhang/is-native-modules
module native native-module
Last synced: 8 months ago
JSON representation
:ghost: :sparkles: Checking the JS module is native or not.Using the `process.binding` to connect with c++
- Host: GitHub
- URL: https://github.com/revan-zhang/is-native-modules
- Owner: revan-zhang
- License: mit
- Created: 2017-04-21T06:51:39.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-02T01:10:46.000Z (almost 9 years ago)
- Last Synced: 2025-07-07T11:44:42.644Z (9 months ago)
- Topics: module, native, native-module
- Language: JavaScript
- Homepage:
- Size: 9.77 KB
- Stars: 9
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Is-Native-Modules
[](https://travis-ci.org/loatheb/is-native-modules) [](https://opensource.org/licenses/mit-license.php) [](https://github.com/ellerbrock/open-source-badge/)
> check the module is native module or not
### import
```shell
npm i --save is-native-modules
```
* CommonJS
```js
const isNativeModules = require('is-native-modules')
```
* ES6 module
```js
import isNativeModules from 'is-native-modules'
```
### usage
```js
isNativeModules('path') // true
isNativeModules('other_module') // false
isNativeModules(['path', 'fs']) // [true, true]
isNativeModules(['other_module', 'some_module']) // [false, false]
isNativeModules([['path', 'fs'], ['other_module', 'some_module']]) // [[true, true], [false, false]]
```