This commit is contained in:
Lilith 2025-02-27 02:26:55 +01:00
parent a71a3b5593
commit cb52890889
Signed by: lilith
GPG key ID: 8712A0F317C37175
16657 changed files with 1483086 additions and 1 deletions

22
home/ags/node_modules/is-builtin-module/index.d.ts generated vendored Normal file
View file

@ -0,0 +1,22 @@
/**
Returns `true` if the given `moduleName` is a Node.js builtin module, `false` otherwise.
@param moduleName - The name of the module.
@example
```
import isBuiltinModule = require('is-builtin-module');
isBuiltinModule('fs/promises');
//=> true
isBuiltinModule('node:fs');
//=> true
isBuiltinModule('unicorn');
//=> false
```
*/
declare function isBuiltinModule(moduleName: string): boolean;
export = isBuiltinModule;

22
home/ags/node_modules/is-builtin-module/index.js generated vendored Normal file
View file

@ -0,0 +1,22 @@
'use strict';
const builtinModules = require('builtin-modules');
const moduleSet = new Set(builtinModules);
const NODE_PROTOCOL = 'node:';
module.exports = moduleName => {
if (typeof moduleName !== 'string') {
throw new TypeError('Expected a string');
}
if (moduleName.startsWith(NODE_PROTOCOL)) {
moduleName = moduleName.slice(NODE_PROTOCOL.length);
}
const slashIndex = moduleName.indexOf('/');
if (slashIndex !== -1 && slashIndex !== moduleName.length - 1) {
moduleName = moduleName.slice(0, slashIndex);
}
return moduleSet.has(moduleName);
};

9
home/ags/node_modules/is-builtin-module/license generated vendored Normal file
View file

@ -0,0 +1,9 @@
MIT License
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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.

47
home/ags/node_modules/is-builtin-module/package.json generated vendored Normal file
View file

@ -0,0 +1,47 @@
{
"name": "is-builtin-module",
"version": "3.2.1",
"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"
},
"engines": {
"node": ">=6"
},
"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": "^3.3.0"
},
"devDependencies": {
"ava": "^0.25.0",
"tsd": "^0.7.2",
"xo": "^0.23.0"
}
}

47
home/ags/node_modules/is-builtin-module/readme.md generated vendored Normal file
View file

@ -0,0 +1,47 @@
# is-builtin-module
> Check if a string matches the name of a Node.js builtin module
## Install
```
$ npm install is-builtin-module
```
## Usage
```js
const isBuiltinModule = require('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) - List of the Node.js builtin modules
---
<div align="center">
<b>
<a href="https://tidelift.com/subscription/pkg/npm-is-builtin-module?utm_source=npm-is-builtin-module&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
</b>
<br>
<sub>
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
</sub>
</div>