Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/loatheb/is-native-modules
:ghost: :sparkles: Checking the JS module is native or not.Using the `process.binding` to connect with c++
https://github.com/loatheb/is-native-modules
module native native-module
Last synced: 3 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/loatheb/is-native-modules
- Owner: loatheb
- License: mit
- Created: 2017-04-21T06:51:39.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-05-02T01:10:46.000Z (over 7 years ago)
- Last Synced: 2024-10-04T00:31:10.874Z (3 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
[![Build Status](https://travis-ci.org/loatheb/is-native-modules.svg?branch=master)](https://travis-ci.org/loatheb/is-native-modules) [![MIT Licence](https://badges.frapsoft.com/os/mit/mit.svg?v=103)](https://opensource.org/licenses/mit-license.php) [![Open Source Love](https://badges.frapsoft.com/os/v2/open-source.svg?v=103)](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') // trueisNativeModules('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]]
```