First upload version 0.0.1

This commit is contained in:
Neyra
2026-02-05 15:27:49 +08:00
commit 8e9b7201ed
4182 changed files with 593136 additions and 0 deletions

9
node_modules/filename-reserved-regex/index.js generated vendored Normal file
View File

@@ -0,0 +1,9 @@
/* eslint-disable no-control-regex */
export default function filenameReservedRegex() {
return /[<>:"/\\|?*\u0000-\u001F]/g;
}
export function windowsReservedNameRegex() {
return /^(con|prn|aux|nul|com\d|lpt\d)$/i;
}

9
node_modules/filename-reserved-regex/license generated vendored Normal file
View 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.

35
node_modules/filename-reserved-regex/package.json generated vendored Normal file
View File

@@ -0,0 +1,35 @@
{
"name": "filename-reserved-regex",
"version": "3.0.0",
"description": "Regular expression for matching reserved filename characters",
"license": "MIT",
"repository": "sindresorhus/filename-reserved-regex",
"funding": "https://github.com/sponsors/sindresorhus",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "https://sindresorhus.com"
},
"type": "module",
"exports": "./index.js",
"engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
},
"scripts": {
"test": "xo && ava"
},
"files": [
"index.js"
],
"keywords": [
"regex",
"regexp",
"filename",
"reserved",
"illegal"
],
"devDependencies": {
"ava": "^3.15.0",
"xo": "^0.44.0"
}
}

42
node_modules/filename-reserved-regex/readme.md generated vendored Normal file
View File

@@ -0,0 +1,42 @@
# filename-reserved-regex
> Regular expression for matching reserved filename characters
On Unix-like systems `/` is reserved and [`<>:"/\|?*`](https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file#naming-conventions) as well as non-printable characters `\u0000-\u001F` on Windows.
## Install
```
$ npm install filename-reserved-regex
```
## Usage
```js
import filenameReservedRegex, {windowsReservedNameRegex} from 'filename-reserved-regex';
filenameReservedRegex().test('foo/bar');
//=> true
filenameReservedRegex().test('foo-bar');
//=> false
'foo/bar'.replace(filenameReservedRegex(), '!');
//=> 'foo!bar'
windowsReservedNameRegex().test('aux');
//=> true
```
## API
### filenameReservedRegex()
Returns a regex that matches all invalid characters.
### windowsReservedNameRegex()
Returns an exact-match case-insensitive regex that matches invalid Windows
filenames. These include `CON`, `PRN`, `AUX`, `NUL`, `COM1`, `COM2`, `COM3`, `COM4`, `COM5`,
`COM6`, `COM7`, `COM8`, `COM9`, `LPT1`, `LPT2`, `LPT3`, `LPT4`, `LPT5`, `LPT6`, `LPT7`, `LPT8`
and `LPT9`.