first commit

This commit is contained in:
2025-10-26 23:10:15 +08:00
commit 8f0345b7be
14961 changed files with 2356381 additions and 0 deletions

21
node_modules/title-case/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2014 Blake Embrey (hello@blakeembrey.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.

33
node_modules/title-case/README.md generated vendored Normal file
View File

@@ -0,0 +1,33 @@
# Title Case
[![NPM version][npm-image]][npm-url]
[![NPM downloads][downloads-image]][downloads-url]
[![Bundle size][bundlephobia-image]][bundlephobia-url]
> Transform a string into [title case](https://en.wikipedia.org/wiki/Letter_case#Title_case) following English rules.
## Installation
```
npm install title-case --save
```
## Usage
```js
import { titleCase } from "title-case";
titleCase("string"); //=> "String"
titleCase("follow step-by-step instructions"); //=> "Follow Step-by-Step Instructions"
```
## License
MIT
[npm-image]: https://img.shields.io/npm/v/title-case.svg?style=flat
[npm-url]: https://npmjs.org/package/title-case
[downloads-image]: https://img.shields.io/npm/dm/title-case.svg?style=flat
[downloads-url]: https://npmjs.org/package/title-case
[bundlephobia-image]: https://img.shields.io/bundlephobia/minzip/title-case.svg
[bundlephobia-url]: https://bundlephobia.com/result?p=title-case

1
node_modules/title-case/dist.es2015/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export declare function titleCase(input: string): string;

30
node_modules/title-case/dist.es2015/index.js generated vendored Normal file
View File

@@ -0,0 +1,30 @@
var SMALL_WORDS = /\b(?:an?d?|a[st]|because|but|by|en|for|i[fn]|neither|nor|o[fnr]|only|over|per|so|some|tha[tn]|the|to|up|upon|vs?\.?|versus|via|when|with|without|yet)\b/i;
var TOKENS = /[^\s:–—-]+|./g;
var WHITESPACE = /\s/;
var IS_MANUAL_CASE = /.(?=[A-Z]|\..)/;
var ALPHANUMERIC_PATTERN = /[A-Za-z0-9\u00C0-\u00FF]/;
export function titleCase(input) {
var result = "";
var m;
// tslint:disable-next-line
while ((m = TOKENS.exec(input)) !== null) {
var token = m[0], index = m.index;
if (
// Ignore already capitalized words.
!IS_MANUAL_CASE.test(token) &&
// Ignore small words except at beginning or end.
(!SMALL_WORDS.test(token) ||
index === 0 ||
index + token.length === input.length) &&
// Ignore URLs.
(input.charAt(index + token.length) !== ":" ||
WHITESPACE.test(input.charAt(index + token.length + 1)))) {
// Find and uppercase first word character, skips over *modifiers*.
result += token.replace(ALPHANUMERIC_PATTERN, function (m) { return m.toUpperCase(); });
continue;
}
result += token;
}
return result;
}
//# sourceMappingURL=index.js.map

1
node_modules/title-case/dist.es2015/index.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,IAAM,WAAW,GAAG,0JAA0J,CAAC;AAC/K,IAAM,MAAM,GAAG,eAAe,CAAC;AAC/B,IAAM,UAAU,GAAG,IAAI,CAAC;AACxB,IAAM,cAAc,GAAG,gBAAgB,CAAC;AACxC,IAAM,oBAAoB,GAAG,0BAA0B,CAAC;AAExD,MAAM,UAAU,SAAS,CAAC,KAAa;IACrC,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,IAAI,CAAyB,CAAC;IAE9B,2BAA2B;IAC3B,OAAO,CAAC,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,IAAI,EAAE;QAChC,IAAG,KAAK,GAAY,CAAC,GAAb,EAAE,KAAK,GAAK,CAAC,MAAN,CAAO;QAE9B;QACE,oCAAoC;QACpC,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC;YAC3B,iDAAiD;YACjD,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC;gBACvB,KAAK,KAAK,CAAC;gBACX,KAAK,GAAG,KAAK,CAAC,MAAM,KAAK,KAAK,CAAC,MAAM,CAAC;YACxC,eAAe;YACf,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,GAAG;gBACzC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAC1D;YACA,mEAAmE;YACnE,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,oBAAoB,EAAE,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,WAAW,EAAE,EAAf,CAAe,CAAC,CAAC;YACtE,SAAS;SACV;QAED,MAAM,IAAI,KAAK,CAAC;KACjB;IAED,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["const SMALL_WORDS = /\\b(?:an?d?|a[st]|because|but|by|en|for|i[fn]|neither|nor|o[fnr]|only|over|per|so|some|tha[tn]|the|to|up|upon|vs?\\.?|versus|via|when|with|without|yet)\\b/i;\nconst TOKENS = /[^\\s:–—-]+|./g;\nconst WHITESPACE = /\\s/;\nconst IS_MANUAL_CASE = /.(?=[A-Z]|\\..)/;\nconst ALPHANUMERIC_PATTERN = /[A-Za-z0-9\\u00C0-\\u00FF]/;\n\nexport function titleCase(input: string) {\n let result = \"\";\n let m: RegExpExecArray | null;\n\n // tslint:disable-next-line\n while ((m = TOKENS.exec(input)) !== null) {\n const { 0: token, index } = m;\n\n if (\n // Ignore already capitalized words.\n !IS_MANUAL_CASE.test(token) &&\n // Ignore small words except at beginning or end.\n (!SMALL_WORDS.test(token) ||\n index === 0 ||\n index + token.length === input.length) &&\n // Ignore URLs.\n (input.charAt(index + token.length) !== \":\" ||\n WHITESPACE.test(input.charAt(index + token.length + 1)))\n ) {\n // Find and uppercase first word character, skips over *modifiers*.\n result += token.replace(ALPHANUMERIC_PATTERN, (m) => m.toUpperCase());\n continue;\n }\n\n result += token;\n }\n\n return result;\n}\n"]}

1
node_modules/title-case/dist.es2015/index.spec.d.ts generated vendored Normal file
View File

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

73
node_modules/title-case/dist.es2015/index.spec.js generated vendored Normal file
View File

@@ -0,0 +1,73 @@
import { inspect } from "util";
import { titleCase } from ".";
/**
* Based on https://github.com/gouch/to-title-case/blob/master/test/tests.json.
*/
var TEST_CASES = [
["", ""],
["2019", "2019"],
["test", "Test"],
["two words", "Two Words"],
["one. two.", "One. Two."],
["a small word starts", "A Small Word Starts"],
["small word ends on", "Small Word Ends On"],
["we keep NASA capitalized", "We Keep NASA Capitalized"],
["pass camelCase through", "Pass camelCase Through"],
["follow step-by-step instructions", "Follow Step-by-Step Instructions"],
["your hair[cut] looks (nice)", "Your Hair[cut] Looks (Nice)"],
["leave Q&A unscathed", "Leave Q&A Unscathed"],
[
"piña colada while you listen to ænima",
"Piña Colada While You Listen to Ænima",
],
["start title end title", "Start Title End Title"],
["start titleend title", "Start TitleEnd Title"],
["start title — end title", "Start Title — End Title"],
["start title—end title", "Start Title—End Title"],
["start title - end title", "Start Title - End Title"],
["don't break", "Don't Break"],
['"double quotes"', '"Double Quotes"'],
['double quotes "inner" word', 'Double Quotes "Inner" Word'],
["fancy double quotes “inner” word", "Fancy Double Quotes “Inner” Word"],
["have you read “The Lottery”?", "Have You Read “The Lottery”?"],
["one: two", "One: Two"],
["one two: three four", "One Two: Three Four"],
['one two: "Three Four"', 'One Two: "Three Four"'],
["email email@example.com address", "Email email@example.com Address"],
[
"you have an https://example.com/ title",
"You Have an https://example.com/ Title",
],
["_underscores around words_", "_Underscores Around Words_"],
["*asterisks around words*", "*Asterisks Around Words*"],
["this vs. that", "This vs. That"],
["this vs that", "This vs That"],
["this v. that", "This v. That"],
["this v that", "This v That"],
[
"Scott Moritz and TheStreet.coms million iPhone la-la land",
"Scott Moritz and TheStreet.coms Million iPhone La-La Land",
],
[
"Notes and observations regarding Apples announcements from The Beat Goes On special event",
"Notes and Observations Regarding Apples Announcements From The Beat Goes On Special Event",
],
[
"the quick brown fox jumps over the lazy dog",
"The Quick Brown Fox Jumps over the Lazy Dog",
],
["newcastle upon tyne", "Newcastle upon Tyne"],
["newcastle *upon* tyne", "Newcastle *upon* Tyne"],
];
describe("swap case", function () {
var _loop_1 = function (input, result) {
it(inspect(input) + " -> " + inspect(result), function () {
expect(titleCase(input)).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];
_loop_1(input, result);
}
});
//# 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,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,GAAG,CAAC;AAE9B;;GAEG;AACH,IAAM,UAAU,GAAuB;IACrC,CAAC,EAAE,EAAE,EAAE,CAAC;IACR,CAAC,MAAM,EAAE,MAAM,CAAC;IAChB,CAAC,MAAM,EAAE,MAAM,CAAC;IAChB,CAAC,WAAW,EAAE,WAAW,CAAC;IAC1B,CAAC,WAAW,EAAE,WAAW,CAAC;IAC1B,CAAC,qBAAqB,EAAE,qBAAqB,CAAC;IAC9C,CAAC,oBAAoB,EAAE,oBAA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,EAAE,qBAAqB,CAAC;IAC9C,CAAC,uBAAuB,EAAE,uBAAuB,CAAC;CACnD,CAAC;AAEF,QAAQ,CAAC,WAAW,EAAE;4BACR,KAAK,EAAE,MAAM;QACvB,EAAE,CAAI,OAAO,CAAC,KAAK,CAAC,YAAO,OAAO,CAAC,MAAM,CAAG,EAAE;YAC5C,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAC3C,CAAC,CAAC,CAAC;;IAHL,KAA8B,UAAU,EAAV,yBAAU,EAAV,wBAAU,EAAV,IAAU;QAA7B,IAAA,qBAAe,EAAd,KAAK,QAAA,EAAE,MAAM,QAAA;gBAAb,KAAK,EAAE,MAAM;KAIxB;AACH,CAAC,CAAC,CAAC","sourcesContent":["import { inspect } from \"util\";\nimport { titleCase } from \".\";\n\n/**\n * Based on https://github.com/gouch/to-title-case/blob/master/test/tests.json.\n */\nconst TEST_CASES: [string, string][] = [\n [\"\", \"\"],\n [\"2019\", \"2019\"],\n [\"test\", \"Test\"],\n [\"two words\", \"Two Words\"],\n [\"one. two.\", \"One. Two.\"],\n [\"a small word starts\", \"A Small Word Starts\"],\n [\"small word ends on\", \"Small Word Ends On\"],\n [\"we keep NASA capitalized\", \"We Keep NASA Capitalized\"],\n [\"pass camelCase through\", \"Pass camelCase Through\"],\n [\"follow step-by-step instructions\", \"Follow Step-by-Step Instructions\"],\n [\"your hair[cut] looks (nice)\", \"Your Hair[cut] Looks (Nice)\"],\n [\"leave Q&A unscathed\", \"Leave Q&A Unscathed\"],\n [\n \"piña colada while you listen to ænima\",\n \"Piña Colada While You Listen to Ænima\",\n ],\n [\"start title end title\", \"Start Title End Title\"],\n [\"start titleend title\", \"Start TitleEnd Title\"],\n [\"start title — end title\", \"Start Title — End Title\"],\n [\"start title—end title\", \"Start Title—End Title\"],\n [\"start title - end title\", \"Start Title - End Title\"],\n [\"don't break\", \"Don't Break\"],\n ['\"double quotes\"', '\"Double Quotes\"'],\n ['double quotes \"inner\" word', 'Double Quotes \"Inner\" Word'],\n [\"fancy double quotes “inner” word\", \"Fancy Double Quotes “Inner” Word\"],\n [\"have you read “The Lottery”?\", \"Have You Read “The Lottery”?\"],\n [\"one: two\", \"One: Two\"],\n [\"one two: three four\", \"One Two: Three Four\"],\n ['one two: \"Three Four\"', 'One Two: \"Three Four\"'],\n [\"email email@example.com address\", \"Email email@example.com Address\"],\n [\n \"you have an https://example.com/ title\",\n \"You Have an https://example.com/ Title\",\n ],\n [\"_underscores around words_\", \"_Underscores Around Words_\"],\n [\"*asterisks around words*\", \"*Asterisks Around Words*\"],\n [\"this vs. that\", \"This vs. That\"],\n [\"this vs that\", \"This vs That\"],\n [\"this v. that\", \"This v. That\"],\n [\"this v that\", \"This v That\"],\n [\n \"Scott Moritz and TheStreet.coms million iPhone la-la land\",\n \"Scott Moritz and TheStreet.coms Million iPhone La-La Land\",\n ],\n [\n \"Notes and observations regarding Apples announcements from The Beat Goes On special event\",\n \"Notes and Observations Regarding Apples Announcements From The Beat Goes On Special Event\",\n ],\n [\n \"the quick brown fox jumps over the lazy dog\",\n \"The Quick Brown Fox Jumps over the Lazy Dog\",\n ],\n [\"newcastle upon tyne\", \"Newcastle upon Tyne\"],\n [\"newcastle *upon* tyne\", \"Newcastle *upon* Tyne\"],\n];\n\ndescribe(\"swap case\", () => {\n for (const [input, result] of TEST_CASES) {\n it(`${inspect(input)} -> ${inspect(result)}`, () => {\n expect(titleCase(input)).toEqual(result);\n });\n }\n});\n"]}

1
node_modules/title-case/dist/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export declare function titleCase(input: string): string;

34
node_modules/title-case/dist/index.js generated vendored Normal file
View File

@@ -0,0 +1,34 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.titleCase = void 0;
var SMALL_WORDS = /\b(?:an?d?|a[st]|because|but|by|en|for|i[fn]|neither|nor|o[fnr]|only|over|per|so|some|tha[tn]|the|to|up|upon|vs?\.?|versus|via|when|with|without|yet)\b/i;
var TOKENS = /[^\s:–—-]+|./g;
var WHITESPACE = /\s/;
var IS_MANUAL_CASE = /.(?=[A-Z]|\..)/;
var ALPHANUMERIC_PATTERN = /[A-Za-z0-9\u00C0-\u00FF]/;
function titleCase(input) {
var result = "";
var m;
// tslint:disable-next-line
while ((m = TOKENS.exec(input)) !== null) {
var token = m[0], index = m.index;
if (
// Ignore already capitalized words.
!IS_MANUAL_CASE.test(token) &&
// Ignore small words except at beginning or end.
(!SMALL_WORDS.test(token) ||
index === 0 ||
index + token.length === input.length) &&
// Ignore URLs.
(input.charAt(index + token.length) !== ":" ||
WHITESPACE.test(input.charAt(index + token.length + 1)))) {
// Find and uppercase first word character, skips over *modifiers*.
result += token.replace(ALPHANUMERIC_PATTERN, function (m) { return m.toUpperCase(); });
continue;
}
result += token;
}
return result;
}
exports.titleCase = titleCase;
//# sourceMappingURL=index.js.map

1
node_modules/title-case/dist/index.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,IAAM,WAAW,GAAG,0JAA0J,CAAC;AAC/K,IAAM,MAAM,GAAG,eAAe,CAAC;AAC/B,IAAM,UAAU,GAAG,IAAI,CAAC;AACxB,IAAM,cAAc,GAAG,gBAAgB,CAAC;AACxC,IAAM,oBAAoB,GAAG,0BAA0B,CAAC;AAExD,SAAgB,SAAS,CAAC,KAAa;IACrC,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,IAAI,CAAyB,CAAC;IAE9B,2BAA2B;IAC3B,OAAO,CAAC,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,IAAI,EAAE;QAChC,IAAG,KAAK,GAAY,CAAC,GAAb,EAAE,KAAK,GAAK,CAAC,MAAN,CAAO;QAE9B;QACE,oCAAoC;QACpC,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC;YAC3B,iDAAiD;YACjD,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC;gBACvB,KAAK,KAAK,CAAC;gBACX,KAAK,GAAG,KAAK,CAAC,MAAM,KAAK,KAAK,CAAC,MAAM,CAAC;YACxC,eAAe;YACf,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,GAAG;gBACzC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAC1D;YACA,mEAAmE;YACnE,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,oBAAoB,EAAE,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,WAAW,EAAE,EAAf,CAAe,CAAC,CAAC;YACtE,SAAS;SACV;QAED,MAAM,IAAI,KAAK,CAAC;KACjB;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AA5BD,8BA4BC","sourcesContent":["const SMALL_WORDS = /\\b(?:an?d?|a[st]|because|but|by|en|for|i[fn]|neither|nor|o[fnr]|only|over|per|so|some|tha[tn]|the|to|up|upon|vs?\\.?|versus|via|when|with|without|yet)\\b/i;\nconst TOKENS = /[^\\s:–—-]+|./g;\nconst WHITESPACE = /\\s/;\nconst IS_MANUAL_CASE = /.(?=[A-Z]|\\..)/;\nconst ALPHANUMERIC_PATTERN = /[A-Za-z0-9\\u00C0-\\u00FF]/;\n\nexport function titleCase(input: string) {\n let result = \"\";\n let m: RegExpExecArray | null;\n\n // tslint:disable-next-line\n while ((m = TOKENS.exec(input)) !== null) {\n const { 0: token, index } = m;\n\n if (\n // Ignore already capitalized words.\n !IS_MANUAL_CASE.test(token) &&\n // Ignore small words except at beginning or end.\n (!SMALL_WORDS.test(token) ||\n index === 0 ||\n index + token.length === input.length) &&\n // Ignore URLs.\n (input.charAt(index + token.length) !== \":\" ||\n WHITESPACE.test(input.charAt(index + token.length + 1)))\n ) {\n // Find and uppercase first word character, skips over *modifiers*.\n result += token.replace(ALPHANUMERIC_PATTERN, (m) => m.toUpperCase());\n continue;\n }\n\n result += token;\n }\n\n return result;\n}\n"]}

1
node_modules/title-case/dist/index.spec.d.ts generated vendored Normal file
View File

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

75
node_modules/title-case/dist/index.spec.js generated vendored Normal file
View File

@@ -0,0 +1,75 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var util_1 = require("util");
var _1 = require(".");
/**
* Based on https://github.com/gouch/to-title-case/blob/master/test/tests.json.
*/
var TEST_CASES = [
["", ""],
["2019", "2019"],
["test", "Test"],
["two words", "Two Words"],
["one. two.", "One. Two."],
["a small word starts", "A Small Word Starts"],
["small word ends on", "Small Word Ends On"],
["we keep NASA capitalized", "We Keep NASA Capitalized"],
["pass camelCase through", "Pass camelCase Through"],
["follow step-by-step instructions", "Follow Step-by-Step Instructions"],
["your hair[cut] looks (nice)", "Your Hair[cut] Looks (Nice)"],
["leave Q&A unscathed", "Leave Q&A Unscathed"],
[
"piña colada while you listen to ænima",
"Piña Colada While You Listen to Ænima",
],
["start title end title", "Start Title End Title"],
["start titleend title", "Start TitleEnd Title"],
["start title — end title", "Start Title — End Title"],
["start title—end title", "Start Title—End Title"],
["start title - end title", "Start Title - End Title"],
["don't break", "Don't Break"],
['"double quotes"', '"Double Quotes"'],
['double quotes "inner" word', 'Double Quotes "Inner" Word'],
["fancy double quotes “inner” word", "Fancy Double Quotes “Inner” Word"],
["have you read “The Lottery”?", "Have You Read “The Lottery”?"],
["one: two", "One: Two"],
["one two: three four", "One Two: Three Four"],
['one two: "Three Four"', 'One Two: "Three Four"'],
["email email@example.com address", "Email email@example.com Address"],
[
"you have an https://example.com/ title",
"You Have an https://example.com/ Title",
],
["_underscores around words_", "_Underscores Around Words_"],
["*asterisks around words*", "*Asterisks Around Words*"],
["this vs. that", "This vs. That"],
["this vs that", "This vs That"],
["this v. that", "This v. That"],
["this v that", "This v That"],
[
"Scott Moritz and TheStreet.coms million iPhone la-la land",
"Scott Moritz and TheStreet.coms Million iPhone La-La Land",
],
[
"Notes and observations regarding Apples announcements from The Beat Goes On special event",
"Notes and Observations Regarding Apples Announcements From The Beat Goes On Special Event",
],
[
"the quick brown fox jumps over the lazy dog",
"The Quick Brown Fox Jumps over the Lazy Dog",
],
["newcastle upon tyne", "Newcastle upon Tyne"],
["newcastle *upon* tyne", "Newcastle *upon* Tyne"],
];
describe("swap case", function () {
var _loop_1 = function (input, result) {
it(util_1.inspect(input) + " -> " + util_1.inspect(result), function () {
expect(_1.titleCase(input)).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];
_loop_1(input, result);
}
});
//# sourceMappingURL=index.spec.js.map

1
node_modules/title-case/dist/index.spec.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"index.spec.js","sourceRoot":"","sources":["../src/index.spec.ts"],"names":[],"mappings":";;AAAA,6BAA+B;AAC/B,sBAA8B;AAE9B;;GAEG;AACH,IAAM,UAAU,GAAuB;IACrC,CAAC,EAAE,EAAE,EAAE,CAAC;IACR,CAAC,MAAM,EAAE,MAAM,CAAC;IAChB,CAAC,MAAM,EAAE,MAAM,CAAC;IAChB,CAAC,WAAW,EAAE,WAAW,CAAC;IAC1B,CAAC,WAAW,EAAE,WAAW,CAAC;IAC1B,CAAC,qBAAqB,EAAE,qBAAqB,CAAC;IAC9C,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;IAC5C,CAAC,0BAA0B,EAAE,0BAA0B,CAAC;IACxD,CAAC,wBAAwB,EAAE,wBAAwB,CAAC;IACpD,CAAC,kCAAkC,EAAE,kCAAkC,CAAC;IACxE,CAAC,6BAA6B,EAAE,6BAA6B,CAAC;IAC9D,CAAC,qBAAqB,EAAE,qBAAqB,CAAC;IAC9C;QACE,uCAAuC;QACvC,uCAAuC;KACxC;IACD,CAAC,yBAAyB,EAA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M,CAAC,CAAC;QAC3C,CAAC,CAAC,CAAC;;IAHL,KAA8B,UAAU,EAAV,yBAAU,EAAV,wBAAU,EAAV,IAAU;QAA7B,IAAA,qBAAe,EAAd,KAAK,QAAA,EAAE,MAAM,QAAA;gBAAb,KAAK,EAAE,MAAM;KAIxB;AACH,CAAC,CAAC,CAAC","sourcesContent":["import { inspect } from \"util\";\nimport { titleCase } from \".\";\n\n/**\n * Based on https://github.com/gouch/to-title-case/blob/master/test/tests.json.\n */\nconst TEST_CASES: [string, string][] = [\n [\"\", \"\"],\n [\"2019\", \"2019\"],\n [\"test\", \"Test\"],\n [\"two words\", \"Two Words\"],\n [\"one. two.\", \"One. Two.\"],\n [\"a small word starts\", \"A Small Word Starts\"],\n [\"small word ends on\", \"Small Word Ends On\"],\n [\"we keep NASA capitalized\", \"We Keep NASA Capitalized\"],\n [\"pass camelCase through\", \"Pass camelCase Through\"],\n [\"follow step-by-step instructions\", \"Follow Step-by-Step Instructions\"],\n [\"your hair[cut] looks (nice)\", \"Your Hair[cut] Looks (Nice)\"],\n [\"leave Q&A unscathed\", \"Leave Q&A Unscathed\"],\n [\n \"piña colada while you listen to ænima\",\n \"Piña Colada While You Listen to Ænima\",\n ],\n [\"start title end title\", \"Start Title End Title\"],\n [\"start titleend title\", \"Start TitleEnd Title\"],\n [\"start title — end title\", \"Start Title — End Title\"],\n [\"start title—end title\", \"Start Title—End Title\"],\n [\"start title - end title\", \"Start Title - End Title\"],\n [\"don't break\", \"Don't Break\"],\n ['\"double quotes\"', '\"Double Quotes\"'],\n ['double quotes \"inner\" word', 'Double Quotes \"Inner\" Word'],\n [\"fancy double quotes “inner” word\", \"Fancy Double Quotes “Inner” Word\"],\n [\"have you read “The Lottery”?\", \"Have You Read “The Lottery”?\"],\n [\"one: two\", \"One: Two\"],\n [\"one two: three four\", \"One Two: Three Four\"],\n ['one two: \"Three Four\"', 'One Two: \"Three Four\"'],\n [\"email email@example.com address\", \"Email email@example.com Address\"],\n [\n \"you have an https://example.com/ title\",\n \"You Have an https://example.com/ Title\",\n ],\n [\"_underscores around words_\", \"_Underscores Around Words_\"],\n [\"*asterisks around words*\", \"*Asterisks Around Words*\"],\n [\"this vs. that\", \"This vs. That\"],\n [\"this vs that\", \"This vs That\"],\n [\"this v. that\", \"This v. That\"],\n [\"this v that\", \"This v That\"],\n [\n \"Scott Moritz and TheStreet.coms million iPhone la-la land\",\n \"Scott Moritz and TheStreet.coms Million iPhone La-La Land\",\n ],\n [\n \"Notes and observations regarding Apples announcements from The Beat Goes On special event\",\n \"Notes and Observations Regarding Apples Announcements From The Beat Goes On Special Event\",\n ],\n [\n \"the quick brown fox jumps over the lazy dog\",\n \"The Quick Brown Fox Jumps over the Lazy Dog\",\n ],\n [\"newcastle upon tyne\", \"Newcastle upon Tyne\"],\n [\"newcastle *upon* tyne\", \"Newcastle *upon* Tyne\"],\n];\n\ndescribe(\"swap case\", () => {\n for (const [input, result] of TEST_CASES) {\n it(`${inspect(input)} -> ${inspect(result)}`, () => {\n expect(titleCase(input)).toEqual(result);\n });\n }\n});\n"]}

88
node_modules/title-case/package.json generated vendored Normal file
View File

@@ -0,0 +1,88 @@
{
"name": "title-case",
"version": "3.0.3",
"description": "Transform a string into title case following English rules",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"module": "dist.es2015/index.js",
"sideEffects": false,
"jsnext:main": "dist.es2015/index.js",
"files": [
"dist/",
"dist.es2015/",
"LICENSE"
],
"scripts": {
"lint": "tslint \"src/**/*\" --project tsconfig.json",
"build": "rimraf dist/ dist.es2015/ && tsc && tsc -P tsconfig.es2015.json",
"specs": "jest --coverage",
"test": "npm run build && npm run lint && npm run specs",
"size": "size-limit",
"prepare": "npm run build"
},
"repository": {
"type": "git",
"url": "git://github.com/blakeembrey/change-case.git"
},
"keywords": [
"title",
"case",
"english",
"capital",
"sentence",
"convert",
"transform"
],
"author": {
"name": "Blake Embrey",
"email": "hello@blakeembrey.com",
"url": "http://blakeembrey.me"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/blakeembrey/change-case/issues"
},
"homepage": "https://github.com/blakeembrey/change-case/tree/master/packages/title-case#readme",
"size-limit": [
{
"path": "dist/index.js",
"limit": "350 B"
}
],
"jest": {
"roots": [
"<rootDir>/src/"
],
"transform": {
"\\.tsx?$": "ts-jest"
},
"testRegex": "(/__tests__/.*|\\.(test|spec))\\.(tsx?|jsx?)$",
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"jsx",
"json",
"node"
]
},
"publishConfig": {
"access": "public"
},
"devDependencies": {
"@size-limit/preset-small-lib": "^2.2.1",
"@types/jest": "^24.0.23",
"@types/node": "^12.12.14",
"jest": "^24.9.0",
"rimraf": "^3.0.0",
"ts-jest": "^24.2.0",
"tslint": "^5.20.1",
"tslint-config-prettier": "^1.18.0",
"tslint-config-standard": "^9.0.0",
"typescript": "^4.1.2"
},
"dependencies": {
"tslib": "^2.0.3"
},
"gitHead": "76a21a7f6f2a226521ef6abd345ff309cbd01fb0"
}