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

21
node_modules/env-var/lib/accessors/regexp.js generated vendored Normal file
View File

@@ -0,0 +1,21 @@
'use strict'
module.exports = function asRegExp (value, flags) {
// We have to test the value and flags indivudally if we want to write our
// own error messages,as there is no way to differentiate between the two
// errors except by using string comparisons.
// Test the flags
try {
RegExp(undefined, flags)
} catch (err) {
throw new Error('invalid regexp flags')
}
try {
return new RegExp(value, flags)
} catch (err) {
// We know that the regexp is the issue because we tested the flags earlier
throw new Error('should be a valid regexp')
}
}