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

16
node_modules/indefinite/lib/helpers.js generated vendored Normal file
View File

@@ -0,0 +1,16 @@
const STARTS_WITH_VOWEL = /^[aeiouAEIOU]/;
/**
* Array#indexOf is faster IF the word starts with "a" (for example),
* but negligibly faster when you have to .toLowerCase() the word, and
* slower if the word happens to start with (e.g.) "u."
*/
exports.startsWithVowel = word => STARTS_WITH_VOWEL.test(word);
exports.capitalize = (article, opts) => {
if (opts.capitalize) {
article = `${article.charAt(0).toUpperCase()}${article.slice(1)}`;
}
return article;
};