@yookue/ts-lang-utils
Version:
Common lang utilities for typescript
294 lines (292 loc) • 12.7 kB
JavaScript
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/util/StringUtils/index.ts
var StringUtils_exports = {};
__export(StringUtils_exports, {
abbreviate: () => import_abbreviate.abbreviate,
allBlank: () => import_allBlank.allBlank,
allEmpty: () => import_allEmpty.allEmpty,
allNotBlank: () => import_allNotBlank.allNotBlank,
allNotEmpty: () => import_allNotEmpty.allNotEmpty,
anyBlank: () => import_anyBlank.anyBlank,
anyEmpty: () => import_anyEmpty.anyEmpty,
anyNotBlank: () => import_anyNotBlank.anyNotBlank,
anyNotEmpty: () => import_anyNotEmpty.anyNotEmpty,
appendIfMissing: () => import_appendIfMissing.appendIfMissing,
appendIfMissingIgnoreCase: () => import_appendIfMissingIgnoreCase.appendIfMissingIgnoreCase,
capitalizeFirst: () => import_capitalizeFirst.capitalizeFirst,
capitalizeFirstLowerTail: () => import_capitalizeFirstLowerTail.capitalizeFirstLowerTail,
center: () => import_center.center,
defaultIfBlank: () => import_defaultIfBlank.defaultIfBlank,
defaultIfEmpty: () => import_defaultIfEmpty.defaultIfEmpty,
defaultString: () => import_defaultString.defaultString,
endsWith: () => import_endsWith.endsWith,
endsWithAny: () => import_endsWithAny.endsWithAny,
endsWithAnyIgnoreCase: () => import_endsWithAnyIgnoreCase.endsWithAnyIgnoreCase,
endsWithIgnoreCase: () => import_endsWithIgnoreCase.endsWithIgnoreCase,
equals: () => import_equals.equals,
equalsAny: () => import_equalsAny.equalsAny,
equalsAnyIgnoreCase: () => import_equalsAnyIgnoreCase.equalsAnyIgnoreCase,
equalsIgnoreCase: () => import_equalsIgnoreCase.equalsIgnoreCase,
escapeHtml: () => import_escapeHtml.escapeHtml,
filterIgnoreBlank: () => import_filterIgnoreBlank.filterIgnoreBlank,
filterIgnoreEmpty: () => import_filterIgnoreEmpty.filterIgnoreEmpty,
formatBrace: () => import_formatBrace.formatBrace,
formatPercent: () => import_formatPercent.formatPercent,
formatPlaceholder: () => import_formatPlaceholder.formatPlaceholder,
fromChars: () => import_fromChars.fromChars,
getLength: () => import_getLength.getLength,
includes: () => import_includes.includes,
includesAny: () => import_includesAny.includesAny,
includesAnyIgnoreCase: () => import_includesAnyIgnoreCase.includesAnyIgnoreCase,
includesIgnoreCase: () => import_includesIgnoreCase.includesIgnoreCase,
isBlank: () => import_isBlank.isBlank,
isEmpty: () => import_isEmpty.isEmpty,
isNotBlank: () => import_isNotBlank.isNotBlank,
isNotEmpty: () => import_isNotEmpty.isNotEmpty,
join: () => import_join.join,
joinWith: () => import_joinWith.joinWith,
left: () => import_left.left,
leftPad: () => import_leftPad.leftPad,
prependIfMissing: () => import_prependIfMissing.prependIfMissing,
prependIfMissingIgnoreCase: () => import_prependIfMissingIgnoreCase.prependIfMissingIgnoreCase,
quoteDouble: () => import_quoteDouble.quoteDouble,
quoteSingle: () => import_quoteSingle.quoteSingle,
removeAll: () => import_removeAll.removeAll,
removeAllIgnoreCase: () => import_removeAllIgnoreCase.removeAllIgnoreCase,
removeBlank: () => import_removeBlank.removeBlank,
removeEnd: () => import_removeEnd.removeEnd,
removeEndIgnoreCase: () => import_removeEndIgnoreCase.removeEndIgnoreCase,
removeEquals: () => import_removeEquals.removeEquals,
removeEqualsIgnoreCase: () => import_removeEqualsIgnoreCase.removeEqualsIgnoreCase,
removeFirst: () => import_removeFirst.removeFirst,
removeFirstIgnoreCase: () => import_removeFirstIgnoreCase.removeFirstIgnoreCase,
removeIncludes: () => import_removeIncludes.removeIncludes,
removeIncludesIgnoreCase: () => import_removeIncludesIgnoreCase.removeIncludesIgnoreCase,
removeStart: () => import_removeStart.removeStart,
removeStartIgnoreCase: () => import_removeStartIgnoreCase.removeStartIgnoreCase,
repeat: () => import_repeat.repeat,
replaceAll: () => import_replaceAll.replaceAll,
replaceAllIgnoreCase: () => import_replaceAllIgnoreCase.replaceAllIgnoreCase,
replaceFirst: () => import_replaceFirst.replaceFirst,
replaceFirstIgnoreCase: () => import_replaceFirstIgnoreCase.replaceFirstIgnoreCase,
reverse: () => import_reverse.reverse,
right: () => import_right.right,
rightPad: () => import_rightPad.rightPad,
split: () => import_split.split,
startsWith: () => import_startsWith.startsWith,
startsWithAny: () => import_startsWithAny.startsWithAny,
startsWithAnyIgnoreCase: () => import_startsWithAnyIgnoreCase.startsWithAnyIgnoreCase,
startsWithIgnoreCase: () => import_startsWithIgnoreCase.startsWithIgnoreCase,
substringAfter: () => import_substringAfter.substringAfter,
substringAfterAny: () => import_substringAfterAny.substringAfterAny,
substringAfterLast: () => import_substringAfterLast.substringAfterLast,
substringAfterLastAny: () => import_substringAfterLastAny.substringAfterLastAny,
substringBefore: () => import_substringBefore.substringBefore,
substringBeforeAny: () => import_substringBeforeAny.substringBeforeAny,
substringBeforeLast: () => import_substringBeforeLast.substringBeforeLast,
substringBeforeLastAny: () => import_substringBeforeLastAny.substringBeforeLastAny,
toCamelCase: () => import_toCamelCase.toCamelCase,
toChars: () => import_toChars.toChars,
toKebabCase: () => import_toKebabCase.toKebabCase,
trim: () => import_trim.trim,
unescapeHtml: () => import_unescapeHtml.unescapeHtml,
unquote: () => import_unquote.unquote
});
module.exports = __toCommonJS(StringUtils_exports);
var import_abbreviate = require("./abbreviate");
var import_allBlank = require("./allBlank");
var import_allEmpty = require("./allEmpty");
var import_allNotBlank = require("./allNotBlank");
var import_allNotEmpty = require("./allNotEmpty");
var import_anyBlank = require("./anyBlank");
var import_anyEmpty = require("./anyEmpty");
var import_anyNotBlank = require("./anyNotBlank");
var import_anyNotEmpty = require("./anyNotEmpty");
var import_appendIfMissing = require("./appendIfMissing");
var import_appendIfMissingIgnoreCase = require("./appendIfMissingIgnoreCase");
var import_capitalizeFirst = require("./capitalizeFirst");
var import_capitalizeFirstLowerTail = require("./capitalizeFirstLowerTail");
var import_center = require("./center");
var import_defaultIfBlank = require("./defaultIfBlank");
var import_defaultIfEmpty = require("./defaultIfEmpty");
var import_defaultString = require("./defaultString");
var import_endsWith = require("./endsWith");
var import_endsWithAny = require("./endsWithAny");
var import_endsWithAnyIgnoreCase = require("./endsWithAnyIgnoreCase");
var import_endsWithIgnoreCase = require("./endsWithIgnoreCase");
var import_equals = require("./equals");
var import_equalsAny = require("./equalsAny");
var import_equalsAnyIgnoreCase = require("./equalsAnyIgnoreCase");
var import_equalsIgnoreCase = require("./equalsIgnoreCase");
var import_escapeHtml = require("./escapeHtml");
var import_filterIgnoreBlank = require("./filterIgnoreBlank");
var import_filterIgnoreEmpty = require("./filterIgnoreEmpty");
var import_formatBrace = require("./formatBrace");
var import_formatPercent = require("./formatPercent");
var import_formatPlaceholder = require("./formatPlaceholder");
var import_fromChars = require("./fromChars");
var import_getLength = require("./getLength");
var import_includes = require("./includes");
var import_includesAny = require("./includesAny");
var import_includesAnyIgnoreCase = require("./includesAnyIgnoreCase");
var import_includesIgnoreCase = require("./includesIgnoreCase");
var import_isBlank = require("./isBlank");
var import_isEmpty = require("./isEmpty");
var import_isNotBlank = require("./isNotBlank");
var import_isNotEmpty = require("./isNotEmpty");
var import_join = require("./join");
var import_joinWith = require("./joinWith");
var import_left = require("./left");
var import_leftPad = require("./leftPad");
var import_prependIfMissing = require("./prependIfMissing");
var import_prependIfMissingIgnoreCase = require("./prependIfMissingIgnoreCase");
var import_quoteDouble = require("./quoteDouble");
var import_quoteSingle = require("./quoteSingle");
var import_removeAll = require("./removeAll");
var import_removeAllIgnoreCase = require("./removeAllIgnoreCase");
var import_removeBlank = require("./removeBlank");
var import_removeEnd = require("./removeEnd");
var import_removeEndIgnoreCase = require("./removeEndIgnoreCase");
var import_removeEquals = require("./removeEquals");
var import_removeEqualsIgnoreCase = require("./removeEqualsIgnoreCase");
var import_removeFirst = require("./removeFirst");
var import_removeFirstIgnoreCase = require("./removeFirstIgnoreCase");
var import_removeIncludes = require("./removeIncludes");
var import_removeIncludesIgnoreCase = require("./removeIncludesIgnoreCase");
var import_removeStart = require("./removeStart");
var import_removeStartIgnoreCase = require("./removeStartIgnoreCase");
var import_repeat = require("./repeat");
var import_replaceAll = require("./replaceAll");
var import_replaceAllIgnoreCase = require("./replaceAllIgnoreCase");
var import_replaceFirst = require("./replaceFirst");
var import_replaceFirstIgnoreCase = require("./replaceFirstIgnoreCase");
var import_reverse = require("./reverse");
var import_right = require("./right");
var import_rightPad = require("./rightPad");
var import_split = require("./split");
var import_startsWith = require("./startsWith");
var import_startsWithAny = require("./startsWithAny");
var import_startsWithAnyIgnoreCase = require("./startsWithAnyIgnoreCase");
var import_startsWithIgnoreCase = require("./startsWithIgnoreCase");
var import_substringAfter = require("./substringAfter");
var import_substringAfterAny = require("./substringAfterAny");
var import_substringAfterLast = require("./substringAfterLast");
var import_substringAfterLastAny = require("./substringAfterLastAny");
var import_substringBefore = require("./substringBefore");
var import_substringBeforeAny = require("./substringBeforeAny");
var import_substringBeforeLast = require("./substringBeforeLast");
var import_substringBeforeLastAny = require("./substringBeforeLastAny");
var import_toCamelCase = require("./toCamelCase");
var import_toChars = require("./toChars");
var import_toKebabCase = require("./toKebabCase");
var import_trim = require("./trim");
var import_unescapeHtml = require("./unescapeHtml");
var import_unquote = require("./unquote");
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
abbreviate,
allBlank,
allEmpty,
allNotBlank,
allNotEmpty,
anyBlank,
anyEmpty,
anyNotBlank,
anyNotEmpty,
appendIfMissing,
appendIfMissingIgnoreCase,
capitalizeFirst,
capitalizeFirstLowerTail,
center,
defaultIfBlank,
defaultIfEmpty,
defaultString,
endsWith,
endsWithAny,
endsWithAnyIgnoreCase,
endsWithIgnoreCase,
equals,
equalsAny,
equalsAnyIgnoreCase,
equalsIgnoreCase,
escapeHtml,
filterIgnoreBlank,
filterIgnoreEmpty,
formatBrace,
formatPercent,
formatPlaceholder,
fromChars,
getLength,
includes,
includesAny,
includesAnyIgnoreCase,
includesIgnoreCase,
isBlank,
isEmpty,
isNotBlank,
isNotEmpty,
join,
joinWith,
left,
leftPad,
prependIfMissing,
prependIfMissingIgnoreCase,
quoteDouble,
quoteSingle,
removeAll,
removeAllIgnoreCase,
removeBlank,
removeEnd,
removeEndIgnoreCase,
removeEquals,
removeEqualsIgnoreCase,
removeFirst,
removeFirstIgnoreCase,
removeIncludes,
removeIncludesIgnoreCase,
removeStart,
removeStartIgnoreCase,
repeat,
replaceAll,
replaceAllIgnoreCase,
replaceFirst,
replaceFirstIgnoreCase,
reverse,
right,
rightPad,
split,
startsWith,
startsWithAny,
startsWithAnyIgnoreCase,
startsWithIgnoreCase,
substringAfter,
substringAfterAny,
substringAfterLast,
substringAfterLastAny,
substringBefore,
substringBeforeAny,
substringBeforeLast,
substringBeforeLastAny,
toCamelCase,
toChars,
toKebabCase,
trim,
unescapeHtml,
unquote
});