builtin-modules 3.0.0 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/builtin-modules.json +3 -0
- package/index.d.ts +14 -0
- package/index.js +4 -3
- package/license +1 -1
- package/package.json +9 -5
- package/readme.md +13 -10
- package/static.d.ts +14 -0
package/builtin-modules.json
CHANGED
package/index.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
List of the Node.js builtin modules.
|
|
3
|
+
|
|
4
|
+
@example
|
|
5
|
+
```
|
|
6
|
+
import builtinModules = require('builtin-modules');
|
|
7
|
+
|
|
8
|
+
console.log(builtinModules);
|
|
9
|
+
//=> ['assert', 'buffer', …]
|
|
10
|
+
```
|
|
11
|
+
*/
|
|
12
|
+
declare const builtinModules: readonly string[];
|
|
13
|
+
|
|
14
|
+
export = builtinModules;
|
package/index.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
const {builtinModules} = require('module');
|
|
3
3
|
|
|
4
|
-
const
|
|
4
|
+
const ignoreList = [
|
|
5
5
|
'sys'
|
|
6
6
|
];
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
// eslint-disable-next-line node/no-deprecated-api
|
|
9
|
+
module.exports = (builtinModules || (process.binding ? Object.keys(process.binding('natives')) : []) || [])
|
|
10
|
+
.filter(x => !/^_|^(internal|v8|node-inspect)\/|\//.test(x) && !ignoreList.includes(x))
|
|
10
11
|
.sort();
|
package/license
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
|
3
|
+
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
6
|
|
package/package.json
CHANGED
|
@@ -1,24 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "builtin-modules",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"description": "List of the Node.js builtin modules",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "sindresorhus/builtin-modules",
|
|
7
|
+
"funding": "https://github.com/sponsors/sindresorhus",
|
|
7
8
|
"author": {
|
|
8
9
|
"name": "Sindre Sorhus",
|
|
9
10
|
"email": "sindresorhus@gmail.com",
|
|
10
|
-
"url": "sindresorhus.com"
|
|
11
|
+
"url": "https://sindresorhus.com"
|
|
11
12
|
},
|
|
12
13
|
"engines": {
|
|
13
14
|
"node": ">=6"
|
|
14
15
|
},
|
|
15
16
|
"scripts": {
|
|
16
|
-
"test": "xo && ava",
|
|
17
|
+
"test": "xo && ava && tsd",
|
|
17
18
|
"make": "node make.js"
|
|
18
19
|
},
|
|
19
20
|
"files": [
|
|
20
21
|
"index.js",
|
|
22
|
+
"index.d.ts",
|
|
21
23
|
"static.js",
|
|
24
|
+
"static.d.ts",
|
|
22
25
|
"builtin-modules.json"
|
|
23
26
|
],
|
|
24
27
|
"keywords": [
|
|
@@ -34,7 +37,8 @@
|
|
|
34
37
|
"names"
|
|
35
38
|
],
|
|
36
39
|
"devDependencies": {
|
|
37
|
-
"ava": "
|
|
38
|
-
"
|
|
40
|
+
"ava": "^1.4.1",
|
|
41
|
+
"tsd": "^0.7.2",
|
|
42
|
+
"xo": "^0.24.0"
|
|
39
43
|
}
|
|
40
44
|
}
|
package/readme.md
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
# builtin-modules
|
|
1
|
+
# builtin-modules
|
|
2
2
|
|
|
3
3
|
> List of the Node.js builtin modules
|
|
4
4
|
|
|
5
|
-
The list is just a [JSON file](builtin-modules.json) and can be used
|
|
6
|
-
|
|
5
|
+
The list is just a [JSON file](builtin-modules.json) and can be used anywhere.
|
|
7
6
|
|
|
8
7
|
## Install
|
|
9
8
|
|
|
@@ -11,7 +10,6 @@ The list is just a [JSON file](builtin-modules.json) and can be used wherever.
|
|
|
11
10
|
$ npm install builtin-modules
|
|
12
11
|
```
|
|
13
12
|
|
|
14
|
-
|
|
15
13
|
## Usage
|
|
16
14
|
|
|
17
15
|
```js
|
|
@@ -21,7 +19,6 @@ console.log(builtinModules);
|
|
|
21
19
|
//=> ['assert', 'buffer', ...]
|
|
22
20
|
```
|
|
23
21
|
|
|
24
|
-
|
|
25
22
|
## API
|
|
26
23
|
|
|
27
24
|
Returns an array of builtin modules fetched from the running Node.js version.
|
|
@@ -30,12 +27,18 @@ Returns an array of builtin modules fetched from the running Node.js version.
|
|
|
30
27
|
|
|
31
28
|
This module also comes bundled with a static array of builtin modules generated from the latest Node.js version. You can get it with `require('builtin-modules/static');`
|
|
32
29
|
|
|
33
|
-
|
|
34
30
|
## Related
|
|
35
31
|
|
|
36
32
|
- [is-builtin-module](https://github.com/sindresorhus/is-builtin-module) - Check if a string matches the name of a Node.js builtin module
|
|
37
33
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
<div align="center">
|
|
37
|
+
<b>
|
|
38
|
+
<a href="https://tidelift.com/subscription/pkg/npm-builtin-modules?utm_source=npm-builtin-modules&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
|
|
39
|
+
</b>
|
|
40
|
+
<br>
|
|
41
|
+
<sub>
|
|
42
|
+
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
|
|
43
|
+
</sub>
|
|
44
|
+
</div>
|
package/static.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Static list of the Node.js builtin modules.
|
|
3
|
+
|
|
4
|
+
@example
|
|
5
|
+
```
|
|
6
|
+
import builtinModulesStatic = require('builtin-modules/static');
|
|
7
|
+
|
|
8
|
+
console.log(builtinModulesStatic);
|
|
9
|
+
//=> ['assert', 'buffer', …]
|
|
10
|
+
```
|
|
11
|
+
*/
|
|
12
|
+
declare const builtinModulesStatic: readonly string[];
|
|
13
|
+
|
|
14
|
+
export = builtinModulesStatic;
|