Website Structure
This commit is contained in:
parent
62812f2090
commit
71f0676a62
22365 changed files with 4265753 additions and 791 deletions
25
Frontend-Learner/node_modules/is-builtin-module/index.d.ts
generated
vendored
Normal file
25
Frontend-Learner/node_modules/is-builtin-module/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
/**
|
||||
Check if a string matches the name of a Node.js builtin module.
|
||||
|
||||
This matches based a [static list of modules](https://github.com/sindresorhus/builtin-modules) from the latest Node.js version. If you want to check for a module in the current Node.js, use the core [`isBuiltin`](https://nodejs.org/api/module.html#moduleisbuiltinmodulename) method.
|
||||
|
||||
@param moduleName - The name of the module.
|
||||
|
||||
@example
|
||||
```
|
||||
import isBuiltinModule from 'is-builtin-module';
|
||||
|
||||
isBuiltinModule('fs');
|
||||
//=> true
|
||||
|
||||
isBuiltinModule('fs/promises');
|
||||
//=> true
|
||||
|
||||
isBuiltinModule('node:fs/promises');
|
||||
//=> true
|
||||
|
||||
isBuiltinModule('unicorn');
|
||||
//=> false
|
||||
```
|
||||
*/
|
||||
export default function isBuiltinModule(moduleName: string): boolean;
|
||||
12
Frontend-Learner/node_modules/is-builtin-module/index.js
generated
vendored
Normal file
12
Frontend-Learner/node_modules/is-builtin-module/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import builtinModules from 'builtin-modules';
|
||||
|
||||
let moduleSet;
|
||||
export default function isBuiltinModule(moduleName) {
|
||||
if (typeof moduleName !== 'string') {
|
||||
throw new TypeError('Expected a string');
|
||||
}
|
||||
|
||||
moduleSet ??= new Set(builtinModules);
|
||||
|
||||
return moduleSet.has(moduleName);
|
||||
}
|
||||
9
Frontend-Learner/node_modules/is-builtin-module/license
generated
vendored
Normal file
9
Frontend-Learner/node_modules/is-builtin-module/license
generated
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
||||
|
||||
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:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
53
Frontend-Learner/node_modules/is-builtin-module/package.json
generated
vendored
Normal file
53
Frontend-Learner/node_modules/is-builtin-module/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
{
|
||||
"name": "is-builtin-module",
|
||||
"version": "5.0.0",
|
||||
"description": "Check if a string matches the name of a Node.js builtin module",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/is-builtin-module",
|
||||
"funding": "https://github.com/sponsors/sindresorhus",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "https://sindresorhus.com"
|
||||
},
|
||||
"type": "module",
|
||||
"exports": {
|
||||
"types": "./index.d.ts",
|
||||
"default": "./index.js"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"engines": {
|
||||
"node": ">=18.20"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava && tsd"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts"
|
||||
],
|
||||
"keywords": [
|
||||
"builtin",
|
||||
"built-in",
|
||||
"builtins",
|
||||
"node",
|
||||
"modules",
|
||||
"core",
|
||||
"bundled",
|
||||
"list",
|
||||
"array",
|
||||
"names",
|
||||
"is",
|
||||
"detect",
|
||||
"check",
|
||||
"match"
|
||||
],
|
||||
"dependencies": {
|
||||
"builtin-modules": "^5.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"ava": "^6.2.0",
|
||||
"tsd": "^0.31.2",
|
||||
"xo": "^0.60.0"
|
||||
}
|
||||
}
|
||||
33
Frontend-Learner/node_modules/is-builtin-module/readme.md
generated
vendored
Normal file
33
Frontend-Learner/node_modules/is-builtin-module/readme.md
generated
vendored
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
# is-builtin-module
|
||||
|
||||
> Check if a string matches the name of a Node.js builtin module
|
||||
|
||||
Note that this matches based a [static list of modules](https://github.com/sindresorhus/builtin-modules) from the latest Node.js version. If you want to check for a module in the current Node.js, use the core [`isBuiltin`](https://nodejs.org/api/module.html#moduleisbuiltinmodulename) method.
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
npm install is-builtin-module
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
import isBuiltinModule from 'is-builtin-module';
|
||||
|
||||
isBuiltinModule('fs');
|
||||
//=> true
|
||||
|
||||
isBuiltinModule('fs/promises');
|
||||
//=> true
|
||||
|
||||
isBuiltinModule('node:fs/promises');
|
||||
//=> true
|
||||
|
||||
isBuiltinModule('unicorn');
|
||||
//=> false
|
||||
```
|
||||
|
||||
## Related
|
||||
|
||||
- [builtin-modules](https://github.com/sindresorhus/builtin-modules) - A static list of the Node.js builtin modules from the latest Node.js version
|
||||
Loading…
Add table
Add a link
Reference in a new issue