first commit

This commit is contained in:
monjack
2025-06-20 18:01:48 +08:00
commit 6daa6d65c1
24611 changed files with 2512443 additions and 0 deletions

10
app_vue/node_modules/no-case/dist.es2015/index.d.ts generated vendored Normal file
View File

@ -0,0 +1,10 @@
export interface Options {
splitRegexp?: RegExp | RegExp[];
stripRegexp?: RegExp | RegExp[];
delimiter?: string;
transform?: (part: string, index: number, parts: string[]) => string;
}
/**
* Normalize the string into something other libraries can manipulate easier.
*/
export declare function noCase(input: string, options?: Options): string;

31
app_vue/node_modules/no-case/dist.es2015/index.js generated vendored Normal file
View File

@ -0,0 +1,31 @@
import { lowerCase } from "lower-case";
// Support camel case ("camelCase" -> "camel Case" and "CAMELCase" -> "CAMEL Case").
var DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];
// Remove all non-word characters.
var DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;
/**
* Normalize the string into something other libraries can manipulate easier.
*/
export function noCase(input, options) {
if (options === void 0) { options = {}; }
var _a = options.splitRegexp, splitRegexp = _a === void 0 ? DEFAULT_SPLIT_REGEXP : _a, _b = options.stripRegexp, stripRegexp = _b === void 0 ? DEFAULT_STRIP_REGEXP : _b, _c = options.transform, transform = _c === void 0 ? lowerCase : _c, _d = options.delimiter, delimiter = _d === void 0 ? " " : _d;
var result = replace(replace(input, splitRegexp, "$1\0$2"), stripRegexp, "\0");
var start = 0;
var end = result.length;
// Trim the delimiter from around the output string.
while (result.charAt(start) === "\0")
start++;
while (result.charAt(end - 1) === "\0")
end--;
// Transform each token independently.
return result.slice(start, end).split("\0").map(transform).join(delimiter);
}
/**
* Replace `re` in the input string with the replacement value.
*/
function replace(input, re, value) {
if (re instanceof RegExp)
return input.replace(re, value);
return re.reduce(function (input, re) { return input.replace(re, value); }, input);
}
//# sourceMappingURL=index.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,O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E,KAAK,CAAC,CAAC;IAC1D,OAAO,EAAE,CAAC,MAAM,CAAC,UAAC,KAAK,EAAE,EAAE,IAAK,OAAA,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,KAAK,CAAC,EAAxB,CAAwB,EAAE,KAAK,CAAC,CAAC;AACnE,CAAC","sourcesContent":["import { lowerCase } from \"lower-case\";\n\nexport interface Options {\n splitRegexp?: RegExp | RegExp[];\n stripRegexp?: RegExp | RegExp[];\n delimiter?: string;\n transform?: (part: string, index: number, parts: string[]) => string;\n}\n\n// Support camel case (\"camelCase\" -> \"camel Case\" and \"CAMELCase\" -> \"CAMEL Case\").\nconst DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];\n\n// Remove all non-word characters.\nconst DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;\n\n/**\n * Normalize the string into something other libraries can manipulate easier.\n */\nexport function noCase(input: string, options: Options = {}) {\n const {\n splitRegexp = DEFAULT_SPLIT_REGEXP,\n stripRegexp = DEFAULT_STRIP_REGEXP,\n transform = lowerCase,\n delimiter = \" \",\n } = options;\n\n let result = replace(\n replace(input, splitRegexp, \"$1\\0$2\"),\n stripRegexp,\n \"\\0\"\n );\n let start = 0;\n let end = result.length;\n\n // Trim the delimiter from around the output string.\n while (result.charAt(start) === \"\\0\") start++;\n while (result.charAt(end - 1) === \"\\0\") end--;\n\n // Transform each token independently.\n return result.slice(start, end).split(\"\\0\").map(transform).join(delimiter);\n}\n\n/**\n * Replace `re` in the input string with the replacement value.\n */\nfunction replace(input: string, re: RegExp | RegExp[], value: string) {\n if (re instanceof RegExp) return input.replace(re, value);\n return re.reduce((input, re) => input.replace(re, value), input);\n}\n"]}

View File

@ -0,0 +1 @@
export {};

57
app_vue/node_modules/no-case/dist.es2015/index.spec.js generated vendored Normal file
View File

@ -0,0 +1,57 @@
import { noCase } from ".";
var TEST_CASES = [
// Single words.
["test", "test"],
["TEST", "test"],
// Camel case.
["testString", "test string"],
["testString123", "test string123"],
["testString_1_2_3", "test string 1 2 3"],
["x_256", "x 256"],
["anHTMLTag", "an html tag"],
["ID123String", "id123 string"],
["Id123String", "id123 string"],
["foo bar123", "foo bar123"],
["a1bStar", "a1b star"],
// Constant case.
["CONSTANT_CASE ", "constant case"],
["CONST123_FOO", "const123 foo"],
// Random cases.
["FOO_bar", "foo bar"],
["XMLHttpRequest", "xml http request"],
["IQueryAArgs", "i query a args"],
// Non-alphanumeric separators.
["dot.case", "dot case"],
["path/case", "path case"],
["snake_case", "snake case"],
["snake_case123", "snake case123"],
["snake_case_123", "snake case 123"],
// Punctuation.
['"quotes"', "quotes"],
// Space between number parts.
["version 0.45.0", "version 0 45 0"],
["version 0..78..9", "version 0 78 9"],
["version 4_99/4", "version 4 99 4"],
// Whitespace.
[" test ", "test"],
// Number string input.
["something_2014_other", "something 2014 other"],
// https://github.com/blakeembrey/change-case/issues/21
["amazon s3 data", "amazon s3 data"],
["foo_13_bar", "foo 13 bar"],
// Customization.
["camel2019", "camel 2019", { splitRegexp: /([a-z])([A-Z0-9])/g }],
["minifyURLs", "minify urls", { splitRegexp: /([a-z])([A-Z0-9])/g }],
];
describe("no case", function () {
var _loop_1 = function (input, result, options) {
it(input + " -> " + result, function () {
expect(noCase(input, options)).toEqual(result);
});
};
for (var _i = 0, TEST_CASES_1 = TEST_CASES; _i < TEST_CASES_1.length; _i++) {
var _a = TEST_CASES_1[_i], input = _a[0], result = _a[1], options = _a[2];
_loop_1(input, result, options);
}
});
//# sourceMappingURL=index.spec.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"index.spec.js","sourceRoot":"","sources":["../src/index.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAW,MAAM,GAAG,CAAC;AAEpC,IAAM,UAAU,GAAiC;IAC/C,gBAAgB;IAChB,CAAC,MAAM,EAAE,MAAM,CAAC;IAChB,CAAC,MAAM,EAAE,MAAM,CAAC;IAEhB,cAAc;IACd,CAAC,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E,CAAC,YAAY,EAAE,aAAa,EAAE,EAAE,WAAW,EAAE,oBAAoB,EAAE,CAAC;CACrE,CAAC;AAEF,QAAQ,CAAC,SAAS,EAAE;4BACN,KAAK,EAAE,MAAM,EAAE,OAAO;QAChC,EAAE,CAAI,KAAK,YAAO,MAAQ,EAAE;YAC1B,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACjD,CAAC,CAAC,CAAC;;IAHL,KAAuC,UAAU,EAAV,yBAAU,EAAV,wBAAU,EAAV,IAAU;QAAtC,IAAA,qBAAwB,EAAvB,KAAK,QAAA,EAAE,MAAM,QAAA,EAAE,OAAO,QAAA;gBAAtB,KAAK,EAAE,MAAM,EAAE,OAAO;KAIjC;AACH,CAAC,CAAC,CAAC","sourcesContent":["import { noCase, Options } from \".\";\n\nconst TEST_CASES: [string, string, Options?][] = [\n // Single words.\n [\"test\", \"test\"],\n [\"TEST\", \"test\"],\n\n // Camel case.\n [\"testString\", \"test string\"],\n [\"testString123\", \"test string123\"],\n [\"testString_1_2_3\", \"test string 1 2 3\"],\n [\"x_256\", \"x 256\"],\n [\"anHTMLTag\", \"an html tag\"],\n [\"ID123String\", \"id123 string\"],\n [\"Id123String\", \"id123 string\"],\n [\"foo bar123\", \"foo bar123\"],\n [\"a1bStar\", \"a1b star\"],\n\n // Constant case.\n [\"CONSTANT_CASE \", \"constant case\"],\n [\"CONST123_FOO\", \"const123 foo\"],\n\n // Random cases.\n [\"FOO_bar\", \"foo bar\"],\n [\"XMLHttpRequest\", \"xml http request\"],\n [\"IQueryAArgs\", \"i query a args\"],\n\n // Non-alphanumeric separators.\n [\"dot.case\", \"dot case\"],\n [\"path/case\", \"path case\"],\n [\"snake_case\", \"snake case\"],\n [\"snake_case123\", \"snake case123\"],\n [\"snake_case_123\", \"snake case 123\"],\n\n // Punctuation.\n ['\"quotes\"', \"quotes\"],\n\n // Space between number parts.\n [\"version 0.45.0\", \"version 0 45 0\"],\n [\"version 0..78..9\", \"version 0 78 9\"],\n [\"version 4_99/4\", \"version 4 99 4\"],\n\n // Whitespace.\n [\" test \", \"test\"],\n\n // Number string input.\n [\"something_2014_other\", \"something 2014 other\"],\n\n // https://github.com/blakeembrey/change-case/issues/21\n [\"amazon s3 data\", \"amazon s3 data\"],\n [\"foo_13_bar\", \"foo 13 bar\"],\n\n // Customization.\n [\"camel2019\", \"camel 2019\", { splitRegexp: /([a-z])([A-Z0-9])/g }],\n [\"minifyURLs\", \"minify urls\", { splitRegexp: /([a-z])([A-Z0-9])/g }],\n];\n\ndescribe(\"no case\", () => {\n for (const [input, result, options] of TEST_CASES) {\n it(`${input} -> ${result}`, () => {\n expect(noCase(input, options)).toEqual(result);\n });\n }\n});\n"]}