@oxog/strkit 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -3
- package/dist/chunk-6UK4HHU5.mjs +12 -0
- package/dist/chunk-6UK4HHU5.mjs.map +1 -0
- package/dist/chunk-VXA6NXOA.cjs +12 -0
- package/dist/chunk-VXA6NXOA.cjs.map +1 -0
- package/dist/extend.cjs +1 -1
- package/dist/extend.cjs.map +1 -1
- package/dist/extend.d.cts +1 -1
- package/dist/extend.d.ts +1 -1
- package/dist/extend.mjs +1 -1
- package/dist/extend.mjs.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +39 -23
- package/dist/index.d.ts +39 -23
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/dist/{types-B8r-f173.d.cts → types-C3PxNZVq.d.cts} +10 -4
- package/dist/{types-B8r-f173.d.ts → types-C3PxNZVq.d.ts} +10 -4
- package/package.json +18 -15
- package/dist/chunk-NYBEYU46.mjs +0 -12
- package/dist/chunk-NYBEYU46.mjs.map +0 -1
- package/dist/chunk-QYEYUUS2.cjs +0 -12
- package/dist/chunk-QYEYUUS2.cjs.map +0 -1
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/core/chain.ts","../src/namespace.ts","../src/core/kernel.ts"],"names":["StrKitChainImpl","_StrKitChainImpl","value","camelCase","kebabCase","snakeCase","pascalCase","titleCase","sentenceCase","constantCase","dotCase","pathCase","headerCase","swapCase","toUpper","toLower","capitalize","decapitalize","chars","trim","trimStart","trimEnd","length","char","pad","padStart","padEnd","count","repeat","reverse","options","truncate","wrapper","end","wrap","unwrap","index","str","insert","start","remove","search","replacement","replace","replaceAll","between","before","after","beforeLast","afterLast","strings","append","prepend","surround","collapseWhitespace","escape","unescape","escapeHtml","unescapeHtml","escapeRegex","slugify","sanitizeFilename","stripHtml","allowed","stripTags","clean","normalize","latinise","locale","transliterate","data","template","args","sprintf","pattern","mask","unmask","isEmail","isUrl","version","isUuid","isIp","isIpv4","isIpv6","isPhone","isCreditCard","isEmpty","isBlank","isAlpha","isNumeric","isAlphanumeric","isHex","isBase64","isJson","isUpperCase","isLowerCase","wordCount","charCount","lineCount","sentenceCount","paragraphCount","byteSize","entropy","frequency","readingTime","speakingTime","contains","startsWith","endsWith","indexOf","lastIndexOf","countOccurrences","positions","match","matchAll","other","levenshtein","levenshteinRatio","dice","jaroWinkler","hamming","cosine","similarity","diffChars","diffWords","diffLines","diff","showCount","pluralize","singularize","isPlural","isSingular","lines","words","S","splice","equals","matches","ordinalize","formatCurrency","formatNumber","lcs","lcsLength","bestMatch","findSimilar","addPluralRule","addIrregular","addUncountable","createPatch","applyPatch","reversePatch","extract","extractAll","StrKitKernelImpl","plugin","name","fn","methodPath","path","pluginName","localeManager","dep","kernel","registerPlugin","getPlugins","hasPlugin"],"mappings":"mEAyKA,IAAMA,EAAAA,CAAN,MAAMC,CAAuC,CAG3C,WAAA,CAAYC,EAAe,CACzB,IAAA,CAAK,MAAA,CAASA,EAChB,CAKQ,OAAA,CAAQA,EAA4B,CAC1C,OAAO,IAAID,CAAAA,CAAgBC,CAAK,CAClC,CAGA,IAAI,MAAA,EAAiB,CACnB,OAAO,IAAA,CAAK,MAAA,CAAO,MACrB,CAEA,IAAI,CAAA,EAAY,CACd,OAAO,IAAA,CAAK,MACd,CAEA,IAAI,KAAA,EAAgB,CAClB,OAAO,IAAA,CAAK,MACd,CAGA,QAAA,EAAmB,CACjB,OAAO,IAAA,CAAK,MACd,CAEA,QAAA,EAAmB,CACjB,OAAO,IAAA,CAAK,MACd,CAEA,KAAA,EAAqB,CACnB,OAAO,IAAA,CAAK,OAAA,CAAQ,IAAA,CAAK,MAAM,CACjC,CAGA,SAAA,EAAyB,CACvB,OAAO,IAAA,CAAK,OAAA,CAAmBC,mBAAAA,CAAU,KAAK,MAAM,CAAC,C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AA,4BAAA,CAA8B,CAAA,CAEtE,GAAI,IAAA,CAAK,QAAQ,GAAA,CAAIA,CAAAA,CAAO,IAAI,CAAA,CAC9B,MAAM,IAAI,KAAA,CAAM,CAAA,QAAA,EAAWA,CAAAA,CAAO,IAAI,CAAA,uBAAA,CAAyB,CAEnE,CAKQ,iBAAA,CAAkBA,EAA4B,CACpD,GAAIA,CAAAA,CAAO,YAAA,CAAA,CACT,IAAA,IAAWO,CAAAA,IAAOP,EAAO,YAAA,CACvB,GAAI,CAAC,IAAA,CAAK,OAAA,CAAQ,GAAA,CAAIO,CAAG,CAAA,CACvB,MAAM,IAAI,KAAA,CACR,CAAA,QAAA,EAAWP,CAAAA,CAAO,IAAI,CAAA,cAAA,EAAiBO,CAAG,CAAA,yBAAA,CAC5C,CAAA,CAIR,CACF,CAAA,CAKaC,EAAAA,CAAS,IAAIT,EAAAA,CAKnB,SAASU,EAAAA,CAAeT,CAAAA,CAA4B,CACzDQ,EAAAA,CAAO,SAASR,CAAM,EACxB,CAKO,SAASU,EAAAA,EAA6B,CAC3C,OAAOF,EAAAA,CAAO,UAAA,EAChB,CAKO,SAASG,EAAAA,CAAUV,CAAAA,CAAuB,CAC/C,OAAOO,EAAAA,CAAO,SAAA,CAAUP,CAAI,CAC9B","file":"index.cjs","sourcesContent":["import type {\n TruncateOptions,\n SlugifyOptions,\n DiffOptions,\n DiffResult,\n SimilarityOptions,\n StrKitOptions,\n AnalysisOptions,\n FrequencyResult,\n SearchOptions,\n TemplateOptions,\n} from './types.js';\n\n// Import all plugin methods (will be created later)\n// These imports will be added as plugins are implemented\n\n/**\n * StrKit Chain Interface\n * Provides a fluent, immutable API for string manipulation\n */\nexport interface StrKitChain {\n // Properties\n readonly length: number;\n readonly s: string;\n\n // Core methods\n readonly value: string;\n getValue(): string;\n toString(): string;\n clone(): StrKitChain;\n\n // Case methods\n camelCase(): StrKitChain;\n kebabCase(): StrKitChain;\n snakeCase(): StrKitChain;\n pascalCase(): StrKitChain;\n titleCase(): StrKitChain;\n sentenceCase(): StrKitChain;\n constantCase(): StrKitChain;\n dotCase(): StrKitChain;\n pathCase(): StrKitChain;\n headerCase(): StrKitChain;\n swapCase(): StrKitChain;\n upper(): StrKitChain;\n lower(): StrKitChain;\n capitalize(): StrKitChain;\n decapitalize(): StrKitChain;\n\n // Manipulation methods\n trim(chars?: string): StrKitChain;\n trimStart(chars?: string): StrKitChain;\n trimEnd(chars?: string): StrKitChain;\n pad(length: number, char?: string): StrKitChain;\n padStart(length: number, char?: string): StrKitChain;\n padEnd(length: number, char?: string): StrKitChain;\n repeat(count: number): StrKitChain;\n reverse(): StrKitChain;\n truncate(length: number, options?: TruncateOptions): StrKitChain;\n wrap(wrapper: string, end?: string): StrKitChain;\n unwrap(wrapper: string, end?: string): StrKitChain;\n insert(index: number, str: string): StrKitChain;\n remove(start: number, count: number): StrKitChain;\n replace(search: string | RegExp, replacement: string): StrKitChain;\n replaceAll(search: string | RegExp, replacement: string): StrKitChain;\n between(start: string, end: string): StrKitChain;\n before(search: string): StrKitChain;\n after(search: string): StrKitChain;\n beforeLast(search: string): StrKitChain;\n afterLast(search: string): StrKitChain;\n append(...strings: string[]): StrKitChain;\n prepend(...strings: string[]): StrKitChain;\n surround(wrapper: string): StrKitChain;\n collapseWhitespace(): StrKitChain;\n\n // Sanitization methods\n escape(): StrKitChain;\n unescape(): StrKitChain;\n escapeHtml(): StrKitChain;\n unescapeHtml(): StrKitChain;\n escapeRegex(): StrKitChain;\n slugify(options?: SlugifyOptions): StrKitChain;\n filename(): StrKitChain;\n stripHtml(): StrKitChain;\n stripTags(allowed?: string[]): StrKitChain;\n clean(): StrKitChain;\n normalize(): StrKitChain;\n latinise(): StrKitChain;\n transliterate(locale?: string): StrKitChain;\n\n // Formatting methods\n template(data: Record<string, unknown>, options?: TemplateOptions): StrKitChain;\n sprintf(...args: unknown[]): StrKitChain;\n mask(pattern: string): StrKitChain;\n unmask(pattern: string): StrKitChain;\n\n // Validation methods (return boolean)\n isEmail(): boolean;\n isUrl(): boolean;\n isUuid(version?: 1 | 3 | 4 | 5): boolean;\n isIp(): boolean;\n isIpv4(): boolean;\n isIpv6(): boolean;\n isPhone(): boolean;\n isCreditCard(): boolean;\n isEmpty(): boolean;\n isBlank(): boolean;\n isAlpha(): boolean;\n isNumeric(): boolean;\n isAlphanumeric(): boolean;\n isHex(): boolean;\n isBase64(): boolean;\n isJson(): boolean;\n isUpperCase(): boolean;\n isLowerCase(): boolean;\n\n // Analysis methods (return primitives)\n wordCount(): number;\n charCount(options?: AnalysisOptions): number;\n lineCount(): number;\n sentenceCount(): number;\n paragraphCount(): number;\n byteSize(): number;\n entropy(): number;\n frequency(options?: { type?: 'char' | 'word' }): FrequencyResult;\n readingTime(options?: { wordsPerMinute?: number }): number;\n speakingTime(options?: { wordsPerMinute?: number }): number;\n\n // Search methods\n contains(search: string, options?: StrKitOptions): boolean;\n startsWith(search: string): boolean;\n endsWith(search: string): boolean;\n indexOf(search: string, options?: SearchOptions): number;\n lastIndexOf(search: string): number;\n countOccurrences(search: string): number;\n positions(search: string): number[];\n match(pattern: RegExp): string | null;\n matchAll(pattern: RegExp): string[];\n\n // Similarity methods (return number)\n levenshtein(other: string): number;\n levenshteinRatio(other: string): number;\n dice(other: string): number;\n jaroWinkler(other: string): number;\n hamming(other: string): number;\n cosine(other: string): number;\n similarity(other: string, options?: SimilarityOptions): number;\n\n // Diff methods\n diffChars(other: string): DiffResult[];\n diffWords(other: string): DiffResult[];\n diffLines(other: string): DiffResult[];\n diff(other: string, options?: DiffOptions): DiffResult[];\n\n // Pluralization\n plural(count?: number, showCount?: boolean): StrKitChain;\n singular(): StrKitChain;\n isPlural(): boolean;\n isSingular(): boolean;\n\n // Split methods\n lines(): string[];\n words(): string[];\n chars(): string[];\n}\n\n/**\n * StrKit Chain Implementation\n * Immutable wrapper for string operations\n */\nclass StrKitChainImpl implements StrKitChain {\n private readonly _value: string;\n\n constructor(value: string) {\n this._value = value;\n }\n\n /**\n * Create a new chain instance (maintains immutability)\n */\n private _create(value: string): StrKitChain {\n return new StrKitChainImpl(value);\n }\n\n // Properties\n get length(): number {\n return this._value.length;\n }\n\n get s(): string {\n return this._value;\n }\n\n get value(): string {\n return this._value;\n }\n\n // Core methods - getValue kept for backwards compatibility\n getValue(): string {\n return this._value;\n }\n\n toString(): string {\n return this._value;\n }\n\n clone(): StrKitChain {\n return this._create(this._value);\n }\n\n // Case methods - placeholders, will be implemented with plugins\n camelCase(): StrKitChain {\n return this._create(casePlugin.camelCase(this._value));\n }\n\n kebabCase(): StrKitChain {\n return this._create(casePlugin.kebabCase(this._value));\n }\n\n snakeCase(): StrKitChain {\n return this._create(casePlugin.snakeCase(this._value));\n }\n\n pascalCase(): StrKitChain {\n return this._create(casePlugin.pascalCase(this._value));\n }\n\n titleCase(): StrKitChain {\n return this._create(casePlugin.titleCase(this._value));\n }\n\n sentenceCase(): StrKitChain {\n return this._create(casePlugin.sentenceCase(this._value));\n }\n\n constantCase(): StrKitChain {\n return this._create(casePlugin.constantCase(this._value));\n }\n\n dotCase(): StrKitChain {\n return this._create(casePlugin.dotCase(this._value));\n }\n\n pathCase(): StrKitChain {\n return this._create(casePlugin.pathCase(this._value));\n }\n\n headerCase(): StrKitChain {\n return this._create(casePlugin.headerCase(this._value));\n }\n\n swapCase(): StrKitChain {\n return this._create(casePlugin.swapCase(this._value));\n }\n\n upper(): StrKitChain {\n return this._create(casePlugin.toUpper(this._value));\n }\n\n lower(): StrKitChain {\n return this._create(casePlugin.toLower(this._value));\n }\n\n capitalize(): StrKitChain {\n return this._create(casePlugin.capitalize(this._value));\n }\n\n decapitalize(): StrKitChain {\n return this._create(casePlugin.decapitalize(this._value));\n }\n\n // Manipulation methods\n trim(chars?: string): StrKitChain {\n return this._create(manipulationPlugin.trim(this._value, chars));\n }\n\n trimStart(chars?: string): StrKitChain {\n return this._create(manipulationPlugin.trimStart(this._value, chars));\n }\n\n trimEnd(chars?: string): StrKitChain {\n return this._create(manipulationPlugin.trimEnd(this._value, chars));\n }\n\n pad(length: number, char?: string): StrKitChain {\n return this._create(manipulationPlugin.pad(this._value, length, char));\n }\n\n padStart(length: number, char?: string): StrKitChain {\n return this._create(manipulationPlugin.padStart(this._value, length, char));\n }\n\n padEnd(length: number, char?: string): StrKitChain {\n return this._create(manipulationPlugin.padEnd(this._value, length, char));\n }\n\n repeat(count: number): StrKitChain {\n return this._create(manipulationPlugin.repeat(this._value, count));\n }\n\n reverse(): StrKitChain {\n return this._create(manipulationPlugin.reverse(this._value));\n }\n\n truncate(length: number, options?: TruncateOptions): StrKitChain {\n return this._create(manipulationPlugin.truncate(this._value, length, options));\n }\n\n wrap(wrapper: string, end?: string): StrKitChain {\n return this._create(manipulationPlugin.wrap(this._value, wrapper, end));\n }\n\n unwrap(wrapper: string, end?: string): StrKitChain {\n return this._create(manipulationPlugin.unwrap(this._value, wrapper, end));\n }\n\n insert(index: number, str: string): StrKitChain {\n return this._create(manipulationPlugin.insert(this._value, index, str));\n }\n\n remove(start: number, count: number): StrKitChain {\n return this._create(manipulationPlugin.remove(this._value, start, count));\n }\n\n replace(search: string | RegExp, replacement: string): StrKitChain {\n return this._create(manipulationPlugin.replace(this._value, search, replacement));\n }\n\n replaceAll(search: string | RegExp, replacement: string): StrKitChain {\n return this._create(manipulationPlugin.replaceAll(this._value, search, replacement));\n }\n\n between(start: string, end: string): StrKitChain {\n return this._create(manipulationPlugin.between(this._value, start, end));\n }\n\n before(search: string): StrKitChain {\n return this._create(manipulationPlugin.before(this._value, search));\n }\n\n after(search: string): StrKitChain {\n return this._create(manipulationPlugin.after(this._value, search));\n }\n\n beforeLast(search: string): StrKitChain {\n return this._create(manipulationPlugin.beforeLast(this._value, search));\n }\n\n afterLast(search: string): StrKitChain {\n return this._create(manipulationPlugin.afterLast(this._value, search));\n }\n\n append(...strings: string[]): StrKitChain {\n return this._create(manipulationPlugin.append(this._value, ...strings));\n }\n\n prepend(...strings: string[]): StrKitChain {\n return this._create(manipulationPlugin.prepend(this._value, ...strings));\n }\n\n surround(wrapper: string): StrKitChain {\n return this._create(manipulationPlugin.surround(this._value, wrapper));\n }\n\n collapseWhitespace(): StrKitChain {\n return this._create(manipulationPlugin.collapseWhitespace(this._value));\n }\n\n // Sanitization methods\n escape(): StrKitChain {\n return this._create(sanitizationPlugin.escape(this._value));\n }\n\n unescape(): StrKitChain {\n return this._create(sanitizationPlugin.unescape(this._value));\n }\n\n escapeHtml(): StrKitChain {\n return this._create(sanitizationPlugin.escapeHtml(this._value));\n }\n\n unescapeHtml(): StrKitChain {\n return this._create(sanitizationPlugin.unescapeHtml(this._value));\n }\n\n escapeRegex(): StrKitChain {\n return this._create(sanitizationPlugin.escapeRegex(this._value));\n }\n\n slugify(options?: SlugifyOptions): StrKitChain {\n return this._create(sanitizationPlugin.slugify(this._value, options));\n }\n\n filename(): StrKitChain {\n return this._create(sanitizationPlugin.sanitizeFilename(this._value));\n }\n\n stripHtml(): StrKitChain {\n return this._create(sanitizationPlugin.stripHtml(this._value));\n }\n\n stripTags(allowed?: string[]): StrKitChain {\n return this._create(sanitizationPlugin.stripTags(this._value, allowed));\n }\n\n clean(): StrKitChain {\n return this._create(sanitizationPlugin.clean(this._value));\n }\n\n normalize(): StrKitChain {\n return this._create(sanitizationPlugin.normalize(this._value));\n }\n\n latinise(): StrKitChain {\n return this._create(sanitizationPlugin.latinise(this._value));\n }\n\n transliterate(locale?: string): StrKitChain {\n return this._create(sanitizationPlugin.transliterate(this._value, locale));\n }\n\n // Formatting methods\n template(data: Record<string, unknown>, options?: TemplateOptions): StrKitChain {\n return this._create(formattingPlugin.template(this._value, data, options));\n }\n\n sprintf(...args: unknown[]): StrKitChain {\n return this._create(formattingPlugin.sprintf(this._value, ...args));\n }\n\n mask(pattern: string): StrKitChain {\n return this._create(formattingPlugin.mask(this._value, pattern));\n }\n\n unmask(pattern: string): StrKitChain {\n return this._create(formattingPlugin.unmask(this._value, pattern));\n }\n\n // Validation methods\n isEmail(): boolean {\n return validationPlugin.isEmail(this._value);\n }\n\n isUrl(): boolean {\n return validationPlugin.isUrl(this._value);\n }\n\n isUuid(version?: 1 | 3 | 4 | 5): boolean {\n return validationPlugin.isUuid(this._value, version);\n }\n\n isIp(): boolean {\n return validationPlugin.isIp(this._value);\n }\n\n isIpv4(): boolean {\n return validationPlugin.isIpv4(this._value);\n }\n\n isIpv6(): boolean {\n return validationPlugin.isIpv6(this._value);\n }\n\n isPhone(): boolean {\n return validationPlugin.isPhone(this._value);\n }\n\n isCreditCard(): boolean {\n return validationPlugin.isCreditCard(this._value);\n }\n\n isEmpty(): boolean {\n return validationPlugin.isEmpty(this._value);\n }\n\n isBlank(): boolean {\n return validationPlugin.isBlank(this._value);\n }\n\n isAlpha(): boolean {\n return validationPlugin.isAlpha(this._value);\n }\n\n isNumeric(): boolean {\n return validationPlugin.isNumeric(this._value);\n }\n\n isAlphanumeric(): boolean {\n return validationPlugin.isAlphanumeric(this._value);\n }\n\n isHex(): boolean {\n return validationPlugin.isHex(this._value);\n }\n\n isBase64(): boolean {\n return validationPlugin.isBase64(this._value);\n }\n\n isJson(): boolean {\n return validationPlugin.isJson(this._value);\n }\n\n isUpperCase(): boolean {\n return validationPlugin.isUpperCase(this._value);\n }\n\n isLowerCase(): boolean {\n return validationPlugin.isLowerCase(this._value);\n }\n\n // Analysis methods\n wordCount(): number {\n return analysisPlugin.wordCount(this._value);\n }\n\n charCount(options?: AnalysisOptions): number {\n return analysisPlugin.charCount(this._value, options);\n }\n\n lineCount(): number {\n return analysisPlugin.lineCount(this._value);\n }\n\n sentenceCount(): number {\n return analysisPlugin.sentenceCount(this._value);\n }\n\n paragraphCount(): number {\n return analysisPlugin.paragraphCount(this._value);\n }\n\n byteSize(): number {\n return analysisPlugin.byteSize(this._value);\n }\n\n entropy(): number {\n return analysisPlugin.entropy(this._value);\n }\n\n frequency(options?: { type?: 'char' | 'word' }): FrequencyResult {\n return analysisPlugin.frequency(this._value, options);\n }\n\n readingTime(options?: { wordsPerMinute?: number }): number {\n return analysisPlugin.readingTime(this._value, options);\n }\n\n speakingTime(options?: { wordsPerMinute?: number }): number {\n return analysisPlugin.speakingTime(this._value, options);\n }\n\n // Search methods\n contains(search: string, options?: StrKitOptions): boolean {\n return searchPlugin.contains(this._value, search, options);\n }\n\n startsWith(search: string): boolean {\n return searchPlugin.startsWith(this._value, search);\n }\n\n endsWith(search: string): boolean {\n return searchPlugin.endsWith(this._value, search);\n }\n\n indexOf(search: string, options?: SearchOptions): number {\n return searchPlugin.indexOf(this._value, search, options);\n }\n\n lastIndexOf(search: string): number {\n return searchPlugin.lastIndexOf(this._value, search);\n }\n\n countOccurrences(search: string): number {\n return searchPlugin.countOccurrences(this._value, search);\n }\n\n positions(search: string): number[] {\n return searchPlugin.positions(this._value, search);\n }\n\n match(pattern: RegExp): string | null {\n return searchPlugin.match(this._value, pattern);\n }\n\n matchAll(pattern: RegExp): string[] {\n return searchPlugin.matchAll(this._value, pattern);\n }\n\n // Similarity methods\n levenshtein(other: string): number {\n return similarityPlugin.levenshtein(this._value, other);\n }\n\n levenshteinRatio(other: string): number {\n return similarityPlugin.levenshteinRatio(this._value, other);\n }\n\n dice(other: string): number {\n return similarityPlugin.dice(this._value, other);\n }\n\n jaroWinkler(other: string): number {\n return similarityPlugin.jaroWinkler(this._value, other);\n }\n\n hamming(other: string): number {\n return similarityPlugin.hamming(this._value, other);\n }\n\n cosine(other: string): number {\n return similarityPlugin.cosine(this._value, other);\n }\n\n similarity(other: string, options?: SimilarityOptions): number {\n return similarityPlugin.similarity(this._value, other, options);\n }\n\n // Diff methods\n diffChars(other: string): DiffResult[] {\n return diffPlugin.diffChars(this._value, other);\n }\n\n diffWords(other: string): DiffResult[] {\n return diffPlugin.diffWords(this._value, other);\n }\n\n diffLines(other: string): DiffResult[] {\n return diffPlugin.diffLines(this._value, other);\n }\n\n diff(other: string, options?: DiffOptions): DiffResult[] {\n return diffPlugin.diff(this._value, other, options);\n }\n\n // Pluralization methods\n plural(count?: number, showCount?: boolean): StrKitChain {\n return this._create(pluralizationPlugin.pluralize(this._value, count, showCount));\n }\n\n singular(): StrKitChain {\n return this._create(pluralizationPlugin.singularize(this._value));\n }\n\n isPlural(): boolean {\n return pluralizationPlugin.isPlural(this._value);\n }\n\n isSingular(): boolean {\n return pluralizationPlugin.isSingular(this._value);\n }\n\n // Split methods\n lines(): string[] {\n return manipulationPlugin.lines(this._value);\n }\n\n words(): string[] {\n return manipulationPlugin.words(this._value);\n }\n\n chars(): string[] {\n return manipulationPlugin.chars(this._value);\n }\n}\n\n// Plugin references that will be populated when plugins are loaded\n// These are defined in the respective plugin files and imported\n\nimport * as casePlugin from '../plugins/case/index.js';\nimport * as manipulationPlugin from '../plugins/manipulation/index.js';\nimport * as validationPlugin from '../plugins/validation/index.js';\nimport * as sanitizationPlugin from '../plugins/sanitization/index.js';\nimport * as formattingPlugin from '../plugins/formatting/index.js';\nimport * as similarityPlugin from '../plugins/similarity/index.js';\nimport * as analysisPlugin from '../plugins/analysis/index.js';\nimport * as pluralizationPlugin from '../plugins/pluralization/index.js';\nimport * as diffPlugin from '../plugins/diff/index.js';\nimport * as searchPlugin from '../plugins/search/index.js';\n\n/**\n * Create a new StrKit chain\n * @param value - The string to wrap\n * @returns A chainable string wrapper\n */\nexport function S(value: string): StrKitChain {\n return new StrKitChainImpl(value);\n}\n","/**\n * Namespace API\n * Provides the str.* namespace for organized access to all methods\n */\n\nimport * as casePlugin from './plugins/case/index.js';\nimport * as manipulationPlugin from './plugins/manipulation/index.js';\nimport * as validationPlugin from './plugins/validation/index.js';\nimport * as sanitizationPlugin from './plugins/sanitization/index.js';\nimport * as formattingPlugin from './plugins/formatting/index.js';\nimport * as similarityPlugin from './plugins/similarity/index.js';\nimport * as analysisPlugin from './plugins/analysis/index.js';\nimport * as pluralizationPlugin from './plugins/pluralization/index.js';\nimport * as diffPlugin from './plugins/diff/index.js';\nimport * as searchPlugin from './plugins/search/index.js';\n\n/**\n * The str namespace object\n * Provides organized access to all StrKit methods\n *\n * @example\n * import { str } from '@oxog/strkit';\n *\n * str.case.camel('hello world'); // 'helloWorld'\n * str.validate.email('test@test.com'); // true\n * str.similarity.levenshtein('cat', 'bat'); // 1\n */\nexport const str = {\n /**\n * Case conversion methods\n */\n case: {\n camel: casePlugin.camelCase,\n kebab: casePlugin.kebabCase,\n snake: casePlugin.snakeCase,\n pascal: casePlugin.pascalCase,\n title: casePlugin.titleCase,\n sentence: casePlugin.sentenceCase,\n constant: casePlugin.constantCase,\n dot: casePlugin.dotCase,\n path: casePlugin.pathCase,\n header: casePlugin.headerCase,\n swap: casePlugin.swapCase,\n upper: casePlugin.toUpper,\n lower: casePlugin.toLower,\n capitalize: casePlugin.capitalize,\n decapitalize: casePlugin.decapitalize,\n },\n\n /**\n * String manipulation methods\n */\n manipulation: {\n trim: manipulationPlugin.trim,\n trimStart: manipulationPlugin.trimStart,\n trimEnd: manipulationPlugin.trimEnd,\n pad: manipulationPlugin.pad,\n padStart: manipulationPlugin.padStart,\n padEnd: manipulationPlugin.padEnd,\n repeat: manipulationPlugin.repeat,\n reverse: manipulationPlugin.reverse,\n truncate: manipulationPlugin.truncate,\n wrap: manipulationPlugin.wrap,\n unwrap: manipulationPlugin.unwrap,\n splice: manipulationPlugin.splice,\n insert: manipulationPlugin.insert,\n remove: manipulationPlugin.remove,\n replace: manipulationPlugin.replace,\n replaceAll: manipulationPlugin.replaceAll,\n between: manipulationPlugin.between,\n before: manipulationPlugin.before,\n after: manipulationPlugin.after,\n beforeLast: manipulationPlugin.beforeLast,\n afterLast: manipulationPlugin.afterLast,\n append: manipulationPlugin.append,\n prepend: manipulationPlugin.prepend,\n surround: manipulationPlugin.surround,\n collapseWhitespace: manipulationPlugin.collapseWhitespace,\n lines: manipulationPlugin.lines,\n words: manipulationPlugin.words,\n chars: manipulationPlugin.chars,\n },\n\n /**\n * Validation methods\n */\n validate: {\n email: validationPlugin.isEmail,\n url: validationPlugin.isUrl,\n uuid: validationPlugin.isUuid,\n ip: validationPlugin.isIp,\n ipv4: validationPlugin.isIpv4,\n ipv6: validationPlugin.isIpv6,\n phone: validationPlugin.isPhone,\n creditCard: validationPlugin.isCreditCard,\n empty: validationPlugin.isEmpty,\n blank: validationPlugin.isBlank,\n alpha: validationPlugin.isAlpha,\n numeric: validationPlugin.isNumeric,\n alphanumeric: validationPlugin.isAlphanumeric,\n hex: validationPlugin.isHex,\n base64: validationPlugin.isBase64,\n json: validationPlugin.isJson,\n upperCase: validationPlugin.isUpperCase,\n lowerCase: validationPlugin.isLowerCase,\n contains: validationPlugin.contains,\n startsWith: validationPlugin.startsWith,\n endsWith: validationPlugin.endsWith,\n equals: validationPlugin.equals,\n matches: validationPlugin.matches,\n },\n\n /**\n * Sanitization methods\n */\n sanitize: {\n escape: sanitizationPlugin.escape,\n unescape: sanitizationPlugin.unescape,\n escapeHtml: sanitizationPlugin.escapeHtml,\n unescapeHtml: sanitizationPlugin.unescapeHtml,\n escapeRegex: sanitizationPlugin.escapeRegex,\n slugify: sanitizationPlugin.slugify,\n filename: sanitizationPlugin.sanitizeFilename,\n stripHtml: sanitizationPlugin.stripHtml,\n stripTags: sanitizationPlugin.stripTags,\n clean: sanitizationPlugin.clean,\n normalize: sanitizationPlugin.normalize,\n latinise: sanitizationPlugin.latinise,\n transliterate: sanitizationPlugin.transliterate,\n },\n\n /**\n * Formatting methods\n */\n format: {\n template: formattingPlugin.template,\n sprintf: formattingPlugin.sprintf,\n mask: formattingPlugin.mask,\n unmask: formattingPlugin.unmask,\n ordinalize: formattingPlugin.ordinalize,\n currency: formattingPlugin.formatCurrency,\n number: formattingPlugin.formatNumber,\n },\n\n /**\n * Similarity methods\n */\n similarity: {\n levenshtein: similarityPlugin.levenshtein,\n levenshteinRatio: similarityPlugin.levenshteinRatio,\n dice: similarityPlugin.dice,\n jaroWinkler: similarityPlugin.jaroWinkler,\n hamming: similarityPlugin.hamming,\n cosine: similarityPlugin.cosine,\n lcs: similarityPlugin.lcs,\n lcsLength: similarityPlugin.lcsLength,\n similarity: similarityPlugin.similarity,\n bestMatch: similarityPlugin.bestMatch,\n findSimilar: similarityPlugin.findSimilar,\n },\n\n /**\n * Analysis methods\n */\n analysis: {\n wordCount: analysisPlugin.wordCount,\n charCount: analysisPlugin.charCount,\n lineCount: analysisPlugin.lineCount,\n sentenceCount: analysisPlugin.sentenceCount,\n paragraphCount: analysisPlugin.paragraphCount,\n byteSize: analysisPlugin.byteSize,\n entropy: analysisPlugin.entropy,\n frequency: analysisPlugin.frequency,\n readingTime: analysisPlugin.readingTime,\n speakingTime: analysisPlugin.speakingTime,\n },\n\n /**\n * Pluralization methods\n */\n plural: {\n plural: pluralizationPlugin.pluralize,\n singular: pluralizationPlugin.singularize,\n isPlural: pluralizationPlugin.isPlural,\n isSingular: pluralizationPlugin.isSingular,\n addRule: pluralizationPlugin.addPluralRule,\n addIrregular: pluralizationPlugin.addIrregular,\n addUncountable: pluralizationPlugin.addUncountable,\n },\n\n /**\n * Diff methods\n */\n diff: {\n diff: diffPlugin.diff,\n diffChars: diffPlugin.diffChars,\n diffWords: diffPlugin.diffWords,\n diffLines: diffPlugin.diffLines,\n createPatch: diffPlugin.createPatch,\n applyPatch: diffPlugin.applyPatch,\n reversePatch: diffPlugin.reversePatch,\n },\n\n /**\n * Search methods\n */\n search: {\n contains: searchPlugin.contains,\n startsWith: searchPlugin.startsWith,\n endsWith: searchPlugin.endsWith,\n indexOf: searchPlugin.indexOf,\n lastIndexOf: searchPlugin.lastIndexOf,\n countOccurrences: searchPlugin.countOccurrences,\n positions: searchPlugin.positions,\n match: searchPlugin.match,\n matchAll: searchPlugin.matchAll,\n extract: searchPlugin.extract,\n extractAll: searchPlugin.extractAll,\n },\n};\n","import type { StrKitPlugin, StrKitKernel, StrKitConfig } from './types.js';\nimport { localeManager } from './locale.js';\n\n/**\n * StrKit Kernel implementation\n * Central hub for plugin management and method resolution\n */\nclass StrKitKernelImpl implements StrKitKernel {\n private plugins: Map<string, StrKitPlugin> = new Map();\n private methods: Map<string, (...args: unknown[]) => unknown> = new Map();\n private config: StrKitConfig = { locale: 'en' };\n\n /**\n * Register a plugin with the kernel\n */\n register(plugin: StrKitPlugin): void {\n // Validate plugin\n this.validatePlugin(plugin);\n\n // Check dependencies\n this.checkDependencies(plugin);\n\n // Store plugin\n this.plugins.set(plugin.name, plugin);\n\n // Register all methods\n for (const [name, fn] of Object.entries(plugin.methods)) {\n const methodPath = `${plugin.name}.${name}`;\n this.methods.set(methodPath, fn as (...args: unknown[]) => unknown);\n }\n\n // Call init hook if exists\n if (plugin.init) {\n plugin.init(this);\n }\n }\n\n /**\n * Get a method by path (e.g., 'case.camel')\n */\n getMethod(path: string): ((...args: unknown[]) => unknown) | undefined {\n return this.methods.get(path);\n }\n\n /**\n * Get all methods for a plugin\n */\n getPluginMethods(pluginName: string): Record<string, (...args: unknown[]) => unknown> {\n const plugin = this.plugins.get(pluginName);\n if (!plugin) return {};\n return plugin.methods as Record<string, (...args: unknown[]) => unknown>;\n }\n\n /**\n * Check if a plugin is registered\n */\n hasPlugin(name: string): boolean {\n return this.plugins.has(name);\n }\n\n /**\n * Get all registered plugins\n */\n getPlugins(): StrKitPlugin[] {\n return Array.from(this.plugins.values());\n }\n\n /**\n * Get current locale\n */\n getLocale(): string {\n return this.config.locale;\n }\n\n /**\n * Set current locale\n */\n setLocale(locale: string): void {\n this.config.locale = locale;\n localeManager.setLocale(locale);\n }\n\n /**\n * Validate plugin structure\n */\n private validatePlugin(plugin: StrKitPlugin): void {\n if (!plugin.name) {\n throw new Error('Plugin must have a name');\n }\n if (!plugin.version) {\n throw new Error(`Plugin '${plugin.name}' must have a version`);\n }\n if (!plugin.methods || typeof plugin.methods !== 'object') {\n throw new Error(`Plugin '${plugin.name}' must have a methods object`);\n }\n if (this.plugins.has(plugin.name)) {\n throw new Error(`Plugin '${plugin.name}' is already registered`);\n }\n }\n\n /**\n * Check plugin dependencies\n */\n private checkDependencies(plugin: StrKitPlugin): void {\n if (plugin.dependencies) {\n for (const dep of plugin.dependencies) {\n if (!this.plugins.has(dep)) {\n throw new Error(\n `Plugin '${plugin.name}' depends on '${dep}' which is not registered`\n );\n }\n }\n }\n }\n}\n\n/**\n * Singleton kernel instance\n */\nexport const kernel = new StrKitKernelImpl();\n\n/**\n * Register a plugin with StrKit\n */\nexport function registerPlugin(plugin: StrKitPlugin): void {\n kernel.register(plugin);\n}\n\n/**\n * Get all registered plugins\n */\nexport function getPlugins(): StrKitPlugin[] {\n return kernel.getPlugins();\n}\n\n/**\n * Check if a plugin is registered\n */\nexport function hasPlugin(name: string): boolean {\n return kernel.hasPlugin(name);\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/core/chain.ts","../src/namespace.ts","../src/core/kernel.ts"],"names":["StrKitChainImpl","_StrKitChainImpl","value","camelCase","kebabCase","snakeCase","pascalCase","titleCase","sentenceCase","constantCase","dotCase","pathCase","headerCase","swapCase","toUpper","toLower","capitalize","decapitalize","chars","trim","trimStart","trimEnd","length","char","pad","padStart","padEnd","count","repeat","reverse","options","truncate","wrapper","end","wrap","unwrap","index","str","insert","start","remove","search","replacement","replace","replaceAll","between","before","after","beforeLast","afterLast","strings","append","prepend","surround","collapseWhitespace","escape","unescape","escapeHtml","unescapeHtml","escapeRegex","slugify","sanitizeFilename","stripHtml","allowed","stripTags","clean","normalize","latinise","locale","transliterate","data","template","args","sprintf","pattern","mask","unmask","isEmail","isUrl","version","isUuid","isIp","isIpv4","isIpv6","isPhone","isCreditCard","isEmpty","isBlank","isAlpha","isNumeric","isAlphanumeric","isHex","isBase64","isJson","isUpperCase","isLowerCase","wordCount","charCount","lineCount","sentenceCount","paragraphCount","byteSize","entropy","frequency","readingTime","speakingTime","contains","startsWith","endsWith","indexOf","lastIndexOf","countOccurrences","positions","match","matchAll","other","levenshtein","levenshteinRatio","dice","jaroWinkler","hamming","cosine","similarity","diffChars","diffWords","diffLines","diff","showCount","pluralize","singularize","isPlural","isSingular","lines","words","S","splice","equals","matches","ordinalize","formatCurrency","formatNumber","lcs","lcsLength","bestMatch","findSimilar","addPluralRule","addIrregular","addUncountable","createPatch","applyPatch","reversePatch","extract","extractAll","RESERVED_PLUGIN_NAMES","StrKitKernelImpl","plugin","name","fn","methodPath","path","pluginName","localeManager","dep","kernel","registerPlugin","getPlugins","hasPlugin"],"mappings":"mEAyKA,IAAMA,EAAAA,CAAN,MAAMC,CAAuC,CAG3C,WAAA,CAAYC,EAAe,CACzB,IAAA,CAAK,MAAA,CAASA,EAChB,CAKQ,OAAA,CAAQA,EAA4B,CAC1C,OAAO,IAAID,CAAAA,CAAgBC,CAAK,CAClC,CAGA,IAAI,MAAA,EAAiB,CACnB,OAAO,IAAA,CAAK,MAAA,CAAO,MACrB,CAEA,IAAI,CAAA,EAAY,CACd,OAAO,IAAA,CAAK,MACd,CAEA,IAAI,KAAA,EAAgB,CAClB,OAAO,IAAA,CAAK,MACd,CAGA,QAAA,EAAmB,CACjB,OAAO,IAAA,CAAK,MACd,CAEA,QAAA,EAAmB,CACjB,OAAO,IAAA,CAAK,MACd,CAEA,KAAA,EAAqB,CACnB,OAAO,IAAA,CAAK,OAAA,CAAQ,IAAA,CAAK,MAAM,CACjC,CAGA,WAAyB,CACvB,OAAO,IAAA,CAAK,OAAA,CAAmBC,mBAAAA,CAAU,IAAA,CAAK,MAAM,CAAC,CACvD,CAEA,SAAA,EAAyB,CACvB,OAAO,IAAA,CAAK,OAAA,CAAmBC,mBAAAA,CAAU,IAAA,CAAK,MAAM,CAAC,CACvD,CAEA,WAAyB,CACvB,OAAO,IAAA,CAAK,OAAA,CAAmBC,mBAAAA,CAAU,IAAA,CAAK,MAAM,CAAC,CACvD,CAEA,UAAA,EAA0B,CACxB,OAAO,IAAA,CAAK,QAAmBC,mBAAAA,CAAW,IAAA,CAAK,MAAM,CAAC,CACxD,CAEA,SAAA,EAAyB,CACvB,OAAO,IAAA,CAAK,OAAA,CAAmBC,mBAAAA,CAAU,IAAA,CAAK,MAAM,CAAC,CACvD,CAEA,YAAA,EAA4B,CAC1B,OAAO,IAAA,CAAK,QAAmBC,mBAAAA,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CAAAA,CAAO,IAAI,CAAA,4BAAA,CAA8B,CAAA,CAEtE,GAAI,IAAA,CAAK,OAAA,CAAQ,GAAA,CAAIA,CAAAA,CAAO,IAAI,CAAA,CAC9B,MAAM,IAAI,KAAA,CAAM,CAAA,QAAA,EAAWA,CAAAA,CAAO,IAAI,CAAA,uBAAA,CAAyB,CAAA,CAEjE,GACEF,EAAAA,CAAsB,GAAA,CAAIE,CAAAA,CAAO,IAAI,CAAA,EACrC,MAAA,CAAO,SAAA,CAAU,eAAe,IAAA,CAAKtH,EAAAA,CAAKsH,CAAAA,CAAO,IAAI,CAAA,CAErD,MAAM,IAAI,KAAA,CACR,CAAA,aAAA,EAAgBA,CAAAA,CAAO,IAAI,CAAA,2DAAA,CAC7B,CAEJ,CAKQ,kBAAkBA,CAAAA,CAA4B,CACpD,GAAIA,CAAAA,CAAO,YAAA,CAAA,CACT,IAAA,IAAWO,KAAOP,CAAAA,CAAO,YAAA,CACvB,GAAI,CAAC,IAAA,CAAK,OAAA,CAAQ,IAAIO,CAAG,CAAA,CACvB,MAAM,IAAI,KAAA,CACR,CAAA,QAAA,EAAWP,CAAAA,CAAO,IAAI,CAAA,cAAA,EAAiBO,CAAG,CAAA,yBAAA,CAC5C,CAAA,CAIR,CACF,CAAA,CAKaC,GAAS,IAAIT,EAAAA,CAKnB,SAASU,EAAAA,CAAeT,CAAAA,CAA4B,CACzDQ,EAAAA,CAAO,QAAA,CAASR,CAAM,EACxB,CAKO,SAASU,EAAAA,EAA6B,CAC3C,OAAOF,EAAAA,CAAO,UAAA,EAChB,CAKO,SAASG,EAAAA,CAAUV,CAAAA,CAAuB,CAC/C,OAAOO,EAAAA,CAAO,SAAA,CAAUP,CAAI,CAC9B","file":"index.cjs","sourcesContent":["import type {\n TruncateOptions,\n SlugifyOptions,\n DiffOptions,\n DiffResult,\n SimilarityOptions,\n StrKitOptions,\n AnalysisOptions,\n FrequencyResult,\n SearchOptions,\n TemplateOptions,\n} from './types.js';\n\n// Import all plugin methods (will be created later)\n// These imports will be added as plugins are implemented\n\n/**\n * StrKit Chain Interface\n * Provides a fluent, immutable API for string manipulation\n */\nexport interface StrKitChain {\n // Properties\n readonly length: number;\n readonly s: string;\n\n // Core methods\n readonly value: string;\n getValue(): string;\n toString(): string;\n clone(): StrKitChain;\n\n // Case methods\n camelCase(): StrKitChain;\n kebabCase(): StrKitChain;\n snakeCase(): StrKitChain;\n pascalCase(): StrKitChain;\n titleCase(): StrKitChain;\n sentenceCase(): StrKitChain;\n constantCase(): StrKitChain;\n dotCase(): StrKitChain;\n pathCase(): StrKitChain;\n headerCase(): StrKitChain;\n swapCase(): StrKitChain;\n upper(): StrKitChain;\n lower(): StrKitChain;\n capitalize(): StrKitChain;\n decapitalize(): StrKitChain;\n\n // Manipulation methods\n trim(chars?: string): StrKitChain;\n trimStart(chars?: string): StrKitChain;\n trimEnd(chars?: string): StrKitChain;\n pad(length: number, char?: string): StrKitChain;\n padStart(length: number, char?: string): StrKitChain;\n padEnd(length: number, char?: string): StrKitChain;\n repeat(count: number): StrKitChain;\n reverse(): StrKitChain;\n truncate(length: number, options?: TruncateOptions): StrKitChain;\n wrap(wrapper: string, end?: string): StrKitChain;\n unwrap(wrapper: string, end?: string): StrKitChain;\n insert(index: number, str: string): StrKitChain;\n remove(start: number, count: number): StrKitChain;\n replace(search: string | RegExp, replacement: string): StrKitChain;\n replaceAll(search: string | RegExp, replacement: string): StrKitChain;\n between(start: string, end: string): StrKitChain;\n before(search: string): StrKitChain;\n after(search: string): StrKitChain;\n beforeLast(search: string): StrKitChain;\n afterLast(search: string): StrKitChain;\n append(...strings: string[]): StrKitChain;\n prepend(...strings: string[]): StrKitChain;\n surround(wrapper: string): StrKitChain;\n collapseWhitespace(): StrKitChain;\n\n // Sanitization methods\n escape(): StrKitChain;\n unescape(): StrKitChain;\n escapeHtml(): StrKitChain;\n unescapeHtml(): StrKitChain;\n escapeRegex(): StrKitChain;\n slugify(options?: SlugifyOptions): StrKitChain;\n filename(): StrKitChain;\n stripHtml(): StrKitChain;\n stripTags(allowed?: string[]): StrKitChain;\n clean(): StrKitChain;\n normalize(): StrKitChain;\n latinise(): StrKitChain;\n transliterate(locale?: string): StrKitChain;\n\n // Formatting methods\n template(data: Record<string, unknown>, options?: TemplateOptions): StrKitChain;\n sprintf(...args: unknown[]): StrKitChain;\n mask(pattern: string): StrKitChain;\n unmask(pattern: string): StrKitChain;\n\n // Validation methods (return boolean)\n isEmail(): boolean;\n isUrl(): boolean;\n isUuid(version?: 1 | 3 | 4 | 5): boolean;\n isIp(): boolean;\n isIpv4(): boolean;\n isIpv6(): boolean;\n isPhone(): boolean;\n isCreditCard(): boolean;\n isEmpty(): boolean;\n isBlank(): boolean;\n isAlpha(): boolean;\n isNumeric(): boolean;\n isAlphanumeric(): boolean;\n isHex(): boolean;\n isBase64(): boolean;\n isJson(): boolean;\n isUpperCase(): boolean;\n isLowerCase(): boolean;\n\n // Analysis methods (return primitives)\n wordCount(): number;\n charCount(options?: AnalysisOptions): number;\n lineCount(): number;\n sentenceCount(): number;\n paragraphCount(): number;\n byteSize(): number;\n entropy(): number;\n frequency(options?: { type?: 'char' | 'word' }): FrequencyResult;\n readingTime(options?: { wordsPerMinute?: number }): number;\n speakingTime(options?: { wordsPerMinute?: number }): number;\n\n // Search methods\n contains(search: string, options?: StrKitOptions): boolean;\n startsWith(search: string): boolean;\n endsWith(search: string): boolean;\n indexOf(search: string, options?: SearchOptions): number;\n lastIndexOf(search: string): number;\n countOccurrences(search: string): number;\n positions(search: string): number[];\n match(pattern: RegExp): string | null;\n matchAll(pattern: RegExp): string[];\n\n // Similarity methods (return number)\n levenshtein(other: string): number;\n levenshteinRatio(other: string): number;\n dice(other: string): number;\n jaroWinkler(other: string): number;\n hamming(other: string): number;\n cosine(other: string): number;\n similarity(other: string, options?: SimilarityOptions): number;\n\n // Diff methods\n diffChars(other: string): DiffResult[];\n diffWords(other: string): DiffResult[];\n diffLines(other: string): DiffResult[];\n diff(other: string, options?: DiffOptions): DiffResult[];\n\n // Pluralization\n plural(count?: number, showCount?: boolean): StrKitChain;\n singular(): StrKitChain;\n isPlural(): boolean;\n isSingular(): boolean;\n\n // Split methods\n lines(): string[];\n words(): string[];\n chars(): string[];\n}\n\n/**\n * StrKit Chain Implementation\n * Immutable wrapper for string operations\n */\nclass StrKitChainImpl implements StrKitChain {\n private readonly _value: string;\n\n constructor(value: string) {\n this._value = value;\n }\n\n /**\n * Create a new chain instance (maintains immutability)\n */\n private _create(value: string): StrKitChain {\n return new StrKitChainImpl(value);\n }\n\n // Properties\n get length(): number {\n return this._value.length;\n }\n\n get s(): string {\n return this._value;\n }\n\n get value(): string {\n return this._value;\n }\n\n // Core methods - getValue kept for backwards compatibility\n getValue(): string {\n return this._value;\n }\n\n toString(): string {\n return this._value;\n }\n\n clone(): StrKitChain {\n return this._create(this._value);\n }\n\n // Case methods - placeholders, will be implemented with plugins\n camelCase(): StrKitChain {\n return this._create(casePlugin.camelCase(this._value));\n }\n\n kebabCase(): StrKitChain {\n return this._create(casePlugin.kebabCase(this._value));\n }\n\n snakeCase(): StrKitChain {\n return this._create(casePlugin.snakeCase(this._value));\n }\n\n pascalCase(): StrKitChain {\n return this._create(casePlugin.pascalCase(this._value));\n }\n\n titleCase(): StrKitChain {\n return this._create(casePlugin.titleCase(this._value));\n }\n\n sentenceCase(): StrKitChain {\n return this._create(casePlugin.sentenceCase(this._value));\n }\n\n constantCase(): StrKitChain {\n return this._create(casePlugin.constantCase(this._value));\n }\n\n dotCase(): StrKitChain {\n return this._create(casePlugin.dotCase(this._value));\n }\n\n pathCase(): StrKitChain {\n return this._create(casePlugin.pathCase(this._value));\n }\n\n headerCase(): StrKitChain {\n return this._create(casePlugin.headerCase(this._value));\n }\n\n swapCase(): StrKitChain {\n return this._create(casePlugin.swapCase(this._value));\n }\n\n upper(): StrKitChain {\n return this._create(casePlugin.toUpper(this._value));\n }\n\n lower(): StrKitChain {\n return this._create(casePlugin.toLower(this._value));\n }\n\n capitalize(): StrKitChain {\n return this._create(casePlugin.capitalize(this._value));\n }\n\n decapitalize(): StrKitChain {\n return this._create(casePlugin.decapitalize(this._value));\n }\n\n // Manipulation methods\n trim(chars?: string): StrKitChain {\n return this._create(manipulationPlugin.trim(this._value, chars));\n }\n\n trimStart(chars?: string): StrKitChain {\n return this._create(manipulationPlugin.trimStart(this._value, chars));\n }\n\n trimEnd(chars?: string): StrKitChain {\n return this._create(manipulationPlugin.trimEnd(this._value, chars));\n }\n\n pad(length: number, char?: string): StrKitChain {\n return this._create(manipulationPlugin.pad(this._value, length, char));\n }\n\n padStart(length: number, char?: string): StrKitChain {\n return this._create(manipulationPlugin.padStart(this._value, length, char));\n }\n\n padEnd(length: number, char?: string): StrKitChain {\n return this._create(manipulationPlugin.padEnd(this._value, length, char));\n }\n\n repeat(count: number): StrKitChain {\n return this._create(manipulationPlugin.repeat(this._value, count));\n }\n\n reverse(): StrKitChain {\n return this._create(manipulationPlugin.reverse(this._value));\n }\n\n truncate(length: number, options?: TruncateOptions): StrKitChain {\n return this._create(manipulationPlugin.truncate(this._value, length, options));\n }\n\n wrap(wrapper: string, end?: string): StrKitChain {\n return this._create(manipulationPlugin.wrap(this._value, wrapper, end));\n }\n\n unwrap(wrapper: string, end?: string): StrKitChain {\n return this._create(manipulationPlugin.unwrap(this._value, wrapper, end));\n }\n\n insert(index: number, str: string): StrKitChain {\n return this._create(manipulationPlugin.insert(this._value, index, str));\n }\n\n remove(start: number, count: number): StrKitChain {\n return this._create(manipulationPlugin.remove(this._value, start, count));\n }\n\n replace(search: string | RegExp, replacement: string): StrKitChain {\n return this._create(manipulationPlugin.replace(this._value, search, replacement));\n }\n\n replaceAll(search: string | RegExp, replacement: string): StrKitChain {\n return this._create(manipulationPlugin.replaceAll(this._value, search, replacement));\n }\n\n between(start: string, end: string): StrKitChain {\n return this._create(manipulationPlugin.between(this._value, start, end));\n }\n\n before(search: string): StrKitChain {\n return this._create(manipulationPlugin.before(this._value, search));\n }\n\n after(search: string): StrKitChain {\n return this._create(manipulationPlugin.after(this._value, search));\n }\n\n beforeLast(search: string): StrKitChain {\n return this._create(manipulationPlugin.beforeLast(this._value, search));\n }\n\n afterLast(search: string): StrKitChain {\n return this._create(manipulationPlugin.afterLast(this._value, search));\n }\n\n append(...strings: string[]): StrKitChain {\n return this._create(manipulationPlugin.append(this._value, ...strings));\n }\n\n prepend(...strings: string[]): StrKitChain {\n return this._create(manipulationPlugin.prepend(this._value, ...strings));\n }\n\n surround(wrapper: string): StrKitChain {\n return this._create(manipulationPlugin.surround(this._value, wrapper));\n }\n\n collapseWhitespace(): StrKitChain {\n return this._create(manipulationPlugin.collapseWhitespace(this._value));\n }\n\n // Sanitization methods\n escape(): StrKitChain {\n return this._create(sanitizationPlugin.escape(this._value));\n }\n\n unescape(): StrKitChain {\n return this._create(sanitizationPlugin.unescape(this._value));\n }\n\n escapeHtml(): StrKitChain {\n return this._create(sanitizationPlugin.escapeHtml(this._value));\n }\n\n unescapeHtml(): StrKitChain {\n return this._create(sanitizationPlugin.unescapeHtml(this._value));\n }\n\n escapeRegex(): StrKitChain {\n return this._create(sanitizationPlugin.escapeRegex(this._value));\n }\n\n slugify(options?: SlugifyOptions): StrKitChain {\n return this._create(sanitizationPlugin.slugify(this._value, options));\n }\n\n filename(): StrKitChain {\n return this._create(sanitizationPlugin.sanitizeFilename(this._value));\n }\n\n stripHtml(): StrKitChain {\n return this._create(sanitizationPlugin.stripHtml(this._value));\n }\n\n stripTags(allowed?: string[]): StrKitChain {\n return this._create(sanitizationPlugin.stripTags(this._value, allowed));\n }\n\n clean(): StrKitChain {\n return this._create(sanitizationPlugin.clean(this._value));\n }\n\n normalize(): StrKitChain {\n return this._create(sanitizationPlugin.normalize(this._value));\n }\n\n latinise(): StrKitChain {\n return this._create(sanitizationPlugin.latinise(this._value));\n }\n\n transliterate(locale?: string): StrKitChain {\n return this._create(sanitizationPlugin.transliterate(this._value, locale));\n }\n\n // Formatting methods\n template(data: Record<string, unknown>, options?: TemplateOptions): StrKitChain {\n return this._create(formattingPlugin.template(this._value, data, options));\n }\n\n sprintf(...args: unknown[]): StrKitChain {\n return this._create(formattingPlugin.sprintf(this._value, ...args));\n }\n\n mask(pattern: string): StrKitChain {\n return this._create(formattingPlugin.mask(this._value, pattern));\n }\n\n unmask(pattern: string): StrKitChain {\n return this._create(formattingPlugin.unmask(this._value, pattern));\n }\n\n // Validation methods\n isEmail(): boolean {\n return validationPlugin.isEmail(this._value);\n }\n\n isUrl(): boolean {\n return validationPlugin.isUrl(this._value);\n }\n\n isUuid(version?: 1 | 3 | 4 | 5): boolean {\n return validationPlugin.isUuid(this._value, version);\n }\n\n isIp(): boolean {\n return validationPlugin.isIp(this._value);\n }\n\n isIpv4(): boolean {\n return validationPlugin.isIpv4(this._value);\n }\n\n isIpv6(): boolean {\n return validationPlugin.isIpv6(this._value);\n }\n\n isPhone(): boolean {\n return validationPlugin.isPhone(this._value);\n }\n\n isCreditCard(): boolean {\n return validationPlugin.isCreditCard(this._value);\n }\n\n isEmpty(): boolean {\n return validationPlugin.isEmpty(this._value);\n }\n\n isBlank(): boolean {\n return validationPlugin.isBlank(this._value);\n }\n\n isAlpha(): boolean {\n return validationPlugin.isAlpha(this._value);\n }\n\n isNumeric(): boolean {\n return validationPlugin.isNumeric(this._value);\n }\n\n isAlphanumeric(): boolean {\n return validationPlugin.isAlphanumeric(this._value);\n }\n\n isHex(): boolean {\n return validationPlugin.isHex(this._value);\n }\n\n isBase64(): boolean {\n return validationPlugin.isBase64(this._value);\n }\n\n isJson(): boolean {\n return validationPlugin.isJson(this._value);\n }\n\n isUpperCase(): boolean {\n return validationPlugin.isUpperCase(this._value);\n }\n\n isLowerCase(): boolean {\n return validationPlugin.isLowerCase(this._value);\n }\n\n // Analysis methods\n wordCount(): number {\n return analysisPlugin.wordCount(this._value);\n }\n\n charCount(options?: AnalysisOptions): number {\n return analysisPlugin.charCount(this._value, options);\n }\n\n lineCount(): number {\n return analysisPlugin.lineCount(this._value);\n }\n\n sentenceCount(): number {\n return analysisPlugin.sentenceCount(this._value);\n }\n\n paragraphCount(): number {\n return analysisPlugin.paragraphCount(this._value);\n }\n\n byteSize(): number {\n return analysisPlugin.byteSize(this._value);\n }\n\n entropy(): number {\n return analysisPlugin.entropy(this._value);\n }\n\n frequency(options?: { type?: 'char' | 'word' }): FrequencyResult {\n return analysisPlugin.frequency(this._value, options);\n }\n\n readingTime(options?: { wordsPerMinute?: number }): number {\n return analysisPlugin.readingTime(this._value, options);\n }\n\n speakingTime(options?: { wordsPerMinute?: number }): number {\n return analysisPlugin.speakingTime(this._value, options);\n }\n\n // Search methods\n contains(search: string, options?: StrKitOptions): boolean {\n return searchPlugin.contains(this._value, search, options);\n }\n\n startsWith(search: string): boolean {\n return searchPlugin.startsWith(this._value, search);\n }\n\n endsWith(search: string): boolean {\n return searchPlugin.endsWith(this._value, search);\n }\n\n indexOf(search: string, options?: SearchOptions): number {\n return searchPlugin.indexOf(this._value, search, options);\n }\n\n lastIndexOf(search: string): number {\n return searchPlugin.lastIndexOf(this._value, search);\n }\n\n countOccurrences(search: string): number {\n return searchPlugin.countOccurrences(this._value, search);\n }\n\n positions(search: string): number[] {\n return searchPlugin.positions(this._value, search);\n }\n\n match(pattern: RegExp): string | null {\n return searchPlugin.match(this._value, pattern);\n }\n\n matchAll(pattern: RegExp): string[] {\n return searchPlugin.matchAll(this._value, pattern);\n }\n\n // Similarity methods\n levenshtein(other: string): number {\n return similarityPlugin.levenshtein(this._value, other);\n }\n\n levenshteinRatio(other: string): number {\n return similarityPlugin.levenshteinRatio(this._value, other);\n }\n\n dice(other: string): number {\n return similarityPlugin.dice(this._value, other);\n }\n\n jaroWinkler(other: string): number {\n return similarityPlugin.jaroWinkler(this._value, other);\n }\n\n hamming(other: string): number {\n return similarityPlugin.hamming(this._value, other);\n }\n\n cosine(other: string): number {\n return similarityPlugin.cosine(this._value, other);\n }\n\n similarity(other: string, options?: SimilarityOptions): number {\n return similarityPlugin.similarity(this._value, other, options);\n }\n\n // Diff methods\n diffChars(other: string): DiffResult[] {\n return diffPlugin.diffChars(this._value, other);\n }\n\n diffWords(other: string): DiffResult[] {\n return diffPlugin.diffWords(this._value, other);\n }\n\n diffLines(other: string): DiffResult[] {\n return diffPlugin.diffLines(this._value, other);\n }\n\n diff(other: string, options?: DiffOptions): DiffResult[] {\n return diffPlugin.diff(this._value, other, options);\n }\n\n // Pluralization methods\n plural(count?: number, showCount?: boolean): StrKitChain {\n return this._create(pluralizationPlugin.pluralize(this._value, count, showCount));\n }\n\n singular(): StrKitChain {\n return this._create(pluralizationPlugin.singularize(this._value));\n }\n\n isPlural(): boolean {\n return pluralizationPlugin.isPlural(this._value);\n }\n\n isSingular(): boolean {\n return pluralizationPlugin.isSingular(this._value);\n }\n\n // Split methods\n lines(): string[] {\n return manipulationPlugin.lines(this._value);\n }\n\n words(): string[] {\n return manipulationPlugin.words(this._value);\n }\n\n chars(): string[] {\n return manipulationPlugin.chars(this._value);\n }\n}\n\n// Plugin references that will be populated when plugins are loaded\n// These are defined in the respective plugin files and imported\n\nimport * as casePlugin from '../plugins/case/index.js';\nimport * as manipulationPlugin from '../plugins/manipulation/index.js';\nimport * as validationPlugin from '../plugins/validation/index.js';\nimport * as sanitizationPlugin from '../plugins/sanitization/index.js';\nimport * as formattingPlugin from '../plugins/formatting/index.js';\nimport * as similarityPlugin from '../plugins/similarity/index.js';\nimport * as analysisPlugin from '../plugins/analysis/index.js';\nimport * as pluralizationPlugin from '../plugins/pluralization/index.js';\nimport * as diffPlugin from '../plugins/diff/index.js';\nimport * as searchPlugin from '../plugins/search/index.js';\n\n/**\n * Create a new StrKit chain\n * @param value - The string to wrap\n * @returns A chainable string wrapper\n */\nexport function S(value: string): StrKitChain {\n return new StrKitChainImpl(value);\n}\n","/**\n * Namespace API\n * Provides the str.* namespace for organized access to all methods\n */\n\nimport * as casePlugin from './plugins/case/index.js';\nimport * as manipulationPlugin from './plugins/manipulation/index.js';\nimport * as validationPlugin from './plugins/validation/index.js';\nimport * as sanitizationPlugin from './plugins/sanitization/index.js';\nimport * as formattingPlugin from './plugins/formatting/index.js';\nimport * as similarityPlugin from './plugins/similarity/index.js';\nimport * as analysisPlugin from './plugins/analysis/index.js';\nimport * as pluralizationPlugin from './plugins/pluralization/index.js';\nimport * as diffPlugin from './plugins/diff/index.js';\nimport * as searchPlugin from './plugins/search/index.js';\n\n/**\n * The str namespace object\n * Provides organized access to all StrKit methods\n *\n * @example\n * import { str } from '@oxog/strkit';\n *\n * str.case.camel('hello world'); // 'helloWorld'\n * str.validate.email('test@test.com'); // true\n * str.similarity.levenshtein('cat', 'bat'); // 1\n */\nexport const str = {\n /**\n * Case conversion methods\n */\n case: {\n camel: casePlugin.camelCase,\n kebab: casePlugin.kebabCase,\n snake: casePlugin.snakeCase,\n pascal: casePlugin.pascalCase,\n title: casePlugin.titleCase,\n sentence: casePlugin.sentenceCase,\n constant: casePlugin.constantCase,\n dot: casePlugin.dotCase,\n path: casePlugin.pathCase,\n header: casePlugin.headerCase,\n swap: casePlugin.swapCase,\n upper: casePlugin.toUpper,\n lower: casePlugin.toLower,\n capitalize: casePlugin.capitalize,\n decapitalize: casePlugin.decapitalize,\n },\n\n /**\n * String manipulation methods\n */\n manipulation: {\n trim: manipulationPlugin.trim,\n trimStart: manipulationPlugin.trimStart,\n trimEnd: manipulationPlugin.trimEnd,\n pad: manipulationPlugin.pad,\n padStart: manipulationPlugin.padStart,\n padEnd: manipulationPlugin.padEnd,\n repeat: manipulationPlugin.repeat,\n reverse: manipulationPlugin.reverse,\n truncate: manipulationPlugin.truncate,\n wrap: manipulationPlugin.wrap,\n unwrap: manipulationPlugin.unwrap,\n splice: manipulationPlugin.splice,\n insert: manipulationPlugin.insert,\n remove: manipulationPlugin.remove,\n replace: manipulationPlugin.replace,\n replaceAll: manipulationPlugin.replaceAll,\n between: manipulationPlugin.between,\n before: manipulationPlugin.before,\n after: manipulationPlugin.after,\n beforeLast: manipulationPlugin.beforeLast,\n afterLast: manipulationPlugin.afterLast,\n append: manipulationPlugin.append,\n prepend: manipulationPlugin.prepend,\n surround: manipulationPlugin.surround,\n collapseWhitespace: manipulationPlugin.collapseWhitespace,\n lines: manipulationPlugin.lines,\n words: manipulationPlugin.words,\n chars: manipulationPlugin.chars,\n },\n\n /**\n * Validation methods\n */\n validate: {\n email: validationPlugin.isEmail,\n url: validationPlugin.isUrl,\n uuid: validationPlugin.isUuid,\n ip: validationPlugin.isIp,\n ipv4: validationPlugin.isIpv4,\n ipv6: validationPlugin.isIpv6,\n phone: validationPlugin.isPhone,\n creditCard: validationPlugin.isCreditCard,\n empty: validationPlugin.isEmpty,\n blank: validationPlugin.isBlank,\n alpha: validationPlugin.isAlpha,\n numeric: validationPlugin.isNumeric,\n alphanumeric: validationPlugin.isAlphanumeric,\n hex: validationPlugin.isHex,\n base64: validationPlugin.isBase64,\n json: validationPlugin.isJson,\n upperCase: validationPlugin.isUpperCase,\n lowerCase: validationPlugin.isLowerCase,\n contains: validationPlugin.contains,\n startsWith: validationPlugin.startsWith,\n endsWith: validationPlugin.endsWith,\n equals: validationPlugin.equals,\n matches: validationPlugin.matches,\n },\n\n /**\n * Sanitization methods\n */\n sanitize: {\n escape: sanitizationPlugin.escape,\n unescape: sanitizationPlugin.unescape,\n escapeHtml: sanitizationPlugin.escapeHtml,\n unescapeHtml: sanitizationPlugin.unescapeHtml,\n escapeRegex: sanitizationPlugin.escapeRegex,\n slugify: sanitizationPlugin.slugify,\n filename: sanitizationPlugin.sanitizeFilename,\n stripHtml: sanitizationPlugin.stripHtml,\n stripTags: sanitizationPlugin.stripTags,\n clean: sanitizationPlugin.clean,\n normalize: sanitizationPlugin.normalize,\n latinise: sanitizationPlugin.latinise,\n transliterate: sanitizationPlugin.transliterate,\n },\n\n /**\n * Formatting methods\n */\n format: {\n template: formattingPlugin.template,\n sprintf: formattingPlugin.sprintf,\n mask: formattingPlugin.mask,\n unmask: formattingPlugin.unmask,\n ordinalize: formattingPlugin.ordinalize,\n currency: formattingPlugin.formatCurrency,\n number: formattingPlugin.formatNumber,\n },\n\n /**\n * Similarity methods\n */\n similarity: {\n levenshtein: similarityPlugin.levenshtein,\n levenshteinRatio: similarityPlugin.levenshteinRatio,\n dice: similarityPlugin.dice,\n jaroWinkler: similarityPlugin.jaroWinkler,\n hamming: similarityPlugin.hamming,\n cosine: similarityPlugin.cosine,\n lcs: similarityPlugin.lcs,\n lcsLength: similarityPlugin.lcsLength,\n similarity: similarityPlugin.similarity,\n bestMatch: similarityPlugin.bestMatch,\n findSimilar: similarityPlugin.findSimilar,\n },\n\n /**\n * Analysis methods\n */\n analysis: {\n wordCount: analysisPlugin.wordCount,\n charCount: analysisPlugin.charCount,\n lineCount: analysisPlugin.lineCount,\n sentenceCount: analysisPlugin.sentenceCount,\n paragraphCount: analysisPlugin.paragraphCount,\n byteSize: analysisPlugin.byteSize,\n entropy: analysisPlugin.entropy,\n frequency: analysisPlugin.frequency,\n readingTime: analysisPlugin.readingTime,\n speakingTime: analysisPlugin.speakingTime,\n },\n\n /**\n * Pluralization methods\n */\n plural: {\n plural: pluralizationPlugin.pluralize,\n singular: pluralizationPlugin.singularize,\n isPlural: pluralizationPlugin.isPlural,\n isSingular: pluralizationPlugin.isSingular,\n addRule: pluralizationPlugin.addPluralRule,\n addIrregular: pluralizationPlugin.addIrregular,\n addUncountable: pluralizationPlugin.addUncountable,\n },\n\n /**\n * Diff methods\n */\n diff: {\n diff: diffPlugin.diff,\n diffChars: diffPlugin.diffChars,\n diffWords: diffPlugin.diffWords,\n diffLines: diffPlugin.diffLines,\n createPatch: diffPlugin.createPatch,\n applyPatch: diffPlugin.applyPatch,\n reversePatch: diffPlugin.reversePatch,\n },\n\n /**\n * Search methods\n */\n search: {\n contains: searchPlugin.contains,\n startsWith: searchPlugin.startsWith,\n endsWith: searchPlugin.endsWith,\n indexOf: searchPlugin.indexOf,\n lastIndexOf: searchPlugin.lastIndexOf,\n countOccurrences: searchPlugin.countOccurrences,\n positions: searchPlugin.positions,\n match: searchPlugin.match,\n matchAll: searchPlugin.matchAll,\n extract: searchPlugin.extract,\n extractAll: searchPlugin.extractAll,\n },\n};\n","import type { StrKitPlugin, StrKitKernel, StrKitConfig } from './types.js';\nimport { localeManager } from './locale.js';\nimport { str } from '../namespace.js';\n\n/** Names that must never become keys of the `str` namespace */\nconst RESERVED_PLUGIN_NAMES = new Set(['__proto__', 'prototype', 'constructor']);\n\n/**\n * StrKit Kernel implementation\n * Central hub for plugin management and method resolution\n */\nclass StrKitKernelImpl implements StrKitKernel {\n private plugins: Map<string, StrKitPlugin> = new Map();\n private methods: Map<string, (...args: unknown[]) => unknown> = new Map();\n private config: StrKitConfig = { locale: 'en' };\n\n /**\n * Register a plugin with the kernel\n */\n register(plugin: StrKitPlugin): void {\n // Validate plugin\n this.validatePlugin(plugin);\n\n // Check dependencies\n this.checkDependencies(plugin);\n\n // Store plugin\n this.plugins.set(plugin.name, plugin);\n\n // Register all methods\n for (const [name, fn] of Object.entries(plugin.methods)) {\n const methodPath = `${plugin.name}.${name}`;\n this.methods.set(methodPath, fn as (...args: unknown[]) => unknown);\n }\n\n // Expose the methods on the namespace API: str.<pluginName>.<method>()\n Object.defineProperty(str, plugin.name, {\n value: plugin.methods,\n enumerable: true,\n configurable: true,\n writable: false,\n });\n\n // Call init hook if exists\n if (plugin.init) {\n plugin.init(this);\n }\n }\n\n /**\n * Get a method by path (e.g., 'case.camel')\n */\n getMethod(path: string): ((...args: unknown[]) => unknown) | undefined {\n return this.methods.get(path);\n }\n\n /**\n * Get all methods for a plugin\n */\n getPluginMethods(pluginName: string): Record<string, (...args: unknown[]) => unknown> {\n const plugin = this.plugins.get(pluginName);\n if (!plugin) return {};\n return plugin.methods as Record<string, (...args: unknown[]) => unknown>;\n }\n\n /**\n * Check if a plugin is registered\n */\n hasPlugin(name: string): boolean {\n return this.plugins.has(name);\n }\n\n /**\n * Get all registered plugins\n */\n getPlugins(): StrKitPlugin[] {\n return Array.from(this.plugins.values());\n }\n\n /**\n * Get current locale\n */\n getLocale(): string {\n return this.config.locale;\n }\n\n /**\n * Set current locale\n */\n setLocale(locale: string): void {\n this.config.locale = locale;\n localeManager.setLocale(locale);\n }\n\n /**\n * Validate plugin structure\n */\n private validatePlugin(plugin: StrKitPlugin): void {\n if (!plugin.name) {\n throw new Error('Plugin must have a name');\n }\n if (!plugin.version) {\n throw new Error(`Plugin '${plugin.name}' must have a version`);\n }\n if (!plugin.methods || typeof plugin.methods !== 'object') {\n throw new Error(`Plugin '${plugin.name}' must have a methods object`);\n }\n if (this.plugins.has(plugin.name)) {\n throw new Error(`Plugin '${plugin.name}' is already registered`);\n }\n if (\n RESERVED_PLUGIN_NAMES.has(plugin.name) ||\n Object.prototype.hasOwnProperty.call(str, plugin.name)\n ) {\n throw new Error(\n `Plugin name '${plugin.name}' is reserved (it would replace a built-in str.* namespace)`\n );\n }\n }\n\n /**\n * Check plugin dependencies\n */\n private checkDependencies(plugin: StrKitPlugin): void {\n if (plugin.dependencies) {\n for (const dep of plugin.dependencies) {\n if (!this.plugins.has(dep)) {\n throw new Error(\n `Plugin '${plugin.name}' depends on '${dep}' which is not registered`\n );\n }\n }\n }\n }\n}\n\n/**\n * Singleton kernel instance\n */\nexport const kernel = new StrKitKernelImpl();\n\n/**\n * Register a plugin with StrKit\n */\nexport function registerPlugin(plugin: StrKitPlugin): void {\n kernel.register(plugin);\n}\n\n/**\n * Get all registered plugins\n */\nexport function getPlugins(): StrKitPlugin[] {\n return kernel.getPlugins();\n}\n\n/**\n * Check if a plugin is registered\n */\nexport function hasPlugin(name: string): boolean {\n return kernel.hasPlugin(name);\n}\n"]}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as TruncateOptions, S as SlugifyOptions, a as TemplateOptions, A as AnalysisOptions, F as FrequencyResult, b as StrKitOptions, c as SearchOptions, d as SimilarityOptions, D as DiffResult, e as DiffOptions, M as MaskOptions, C as CurrencyOptions, f as MatchResult, g as StrKitLocale, h as StrKitPlugin } from './types-
|
|
2
|
-
export { P as PatchHunk, i as PatchResult, k as StrKitConfig, j as StrKitKernel } from './types-
|
|
1
|
+
import { T as TruncateOptions, S as SlugifyOptions, a as TemplateOptions, A as AnalysisOptions, F as FrequencyResult, b as StrKitOptions, c as SearchOptions, d as SimilarityOptions, D as DiffResult, e as DiffOptions, M as MaskOptions, C as CurrencyOptions, f as MatchResult, g as StrKitLocale, h as StrKitPlugin } from './types-C3PxNZVq.cjs';
|
|
2
|
+
export { P as PatchHunk, i as PatchResult, k as StrKitConfig, j as StrKitKernel } from './types-C3PxNZVq.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* StrKit Chain Interface
|
|
@@ -250,17 +250,18 @@ declare function trimStart(input: string, chars?: string): string;
|
|
|
250
250
|
*/
|
|
251
251
|
declare function trimEnd(input: string, chars?: string): string;
|
|
252
252
|
/**
|
|
253
|
-
* Pad string on both sides to reach target length
|
|
253
|
+
* Pad string on both sides to reach target length.
|
|
254
|
+
* Lengths are measured in grapheme clusters (user-perceived characters).
|
|
254
255
|
* @example pad('hello', 11, '-') // '---hello---'
|
|
255
256
|
*/
|
|
256
257
|
declare function pad(input: string, length: number, char?: string): string;
|
|
257
258
|
/**
|
|
258
|
-
* Pad string on start to reach target length
|
|
259
|
+
* Pad string on start to reach target length (measured in grapheme clusters)
|
|
259
260
|
* @example padStart('5', 3, '0') // '005'
|
|
260
261
|
*/
|
|
261
262
|
declare function padStart(input: string, length: number, char?: string): string;
|
|
262
263
|
/**
|
|
263
|
-
* Pad string on end to reach target length
|
|
264
|
+
* Pad string on end to reach target length (measured in grapheme clusters)
|
|
264
265
|
* @example padEnd('5', 3, '0') // '500'
|
|
265
266
|
*/
|
|
266
267
|
declare function padEnd(input: string, length: number, char?: string): string;
|
|
@@ -270,12 +271,15 @@ declare function padEnd(input: string, length: number, char?: string): string;
|
|
|
270
271
|
*/
|
|
271
272
|
declare function repeat(input: string, count: number): string;
|
|
272
273
|
/**
|
|
273
|
-
* Reverse string (
|
|
274
|
+
* Reverse string by grapheme cluster (emoji sequences, flags and combining
|
|
275
|
+
* marks stay intact)
|
|
274
276
|
* @example reverse('hello') // 'olleh'
|
|
275
277
|
*/
|
|
276
278
|
declare function reverse(input: string): string;
|
|
277
279
|
/**
|
|
278
|
-
* Truncate string with ellipsis
|
|
280
|
+
* Truncate string with ellipsis.
|
|
281
|
+
* `length` is the maximum result length in grapheme clusters, ellipsis included,
|
|
282
|
+
* so emoji sequences and surrogate pairs are never cut in half.
|
|
279
283
|
* @example truncate('hello world', 8) // 'hello...'
|
|
280
284
|
* @example truncate('hello world', 8, { position: 'middle' }) // 'hel...ld'
|
|
281
285
|
*/
|
|
@@ -373,8 +377,9 @@ declare function lines(input: string): string[];
|
|
|
373
377
|
*/
|
|
374
378
|
declare function words(input: string): string[];
|
|
375
379
|
/**
|
|
376
|
-
* Split string into
|
|
380
|
+
* Split string into grapheme clusters (user-perceived characters)
|
|
377
381
|
* @example chars('hello') // ['h', 'e', 'l', 'l', 'o']
|
|
382
|
+
* @example chars('👨👩👧🇹🇷') // ['👨👩👧', '🇹🇷']
|
|
378
383
|
*/
|
|
379
384
|
declare function chars(input: string): string[];
|
|
380
385
|
|
|
@@ -542,9 +547,12 @@ declare function unescapeHtml(input: string): string;
|
|
|
542
547
|
*/
|
|
543
548
|
declare function escapeRegex(input: string): string;
|
|
544
549
|
/**
|
|
545
|
-
* Create URL-safe slug
|
|
550
|
+
* Create URL-safe slug.
|
|
551
|
+
* Accented Latin, Greek and Cyrillic letters are transliterated; with a `locale`
|
|
552
|
+
* option the locale's transliteration table is applied first.
|
|
546
553
|
* @example slugify('Hello World!') // 'hello-world'
|
|
547
554
|
* @example slugify('Héllo Wörld!') // 'hello-world'
|
|
555
|
+
* @example slugify('Привет мир') // 'privet-mir'
|
|
548
556
|
*/
|
|
549
557
|
declare function slugify(input: string, options?: SlugifyOptions): string;
|
|
550
558
|
/**
|
|
@@ -553,12 +561,14 @@ declare function slugify(input: string, options?: SlugifyOptions): string;
|
|
|
553
561
|
*/
|
|
554
562
|
declare function sanitizeFilename(input: string): string;
|
|
555
563
|
/**
|
|
556
|
-
* Remove all HTML tags
|
|
564
|
+
* Remove all HTML tags, plus the content of `<script>` and `<style>` elements.
|
|
565
|
+
* The result is plain text; it is not a sanitizer for HTML output (use escapeHtml).
|
|
557
566
|
* @example stripHtml('<p>Hello <b>World</b></p>') // 'Hello World'
|
|
558
567
|
*/
|
|
559
568
|
declare function stripHtml(input: string): string;
|
|
560
569
|
/**
|
|
561
|
-
* Remove HTML tags except allowed ones
|
|
570
|
+
* Remove HTML tags except allowed ones.
|
|
571
|
+
* Allowed tags are kept verbatim, attributes included, so this is not an XSS sanitizer.
|
|
562
572
|
* @example stripTags('<p>Hello <b>World</b></p>', ['p']) // '<p>Hello World</p>'
|
|
563
573
|
*/
|
|
564
574
|
declare function stripTags(input: string, allowed?: string[]): string;
|
|
@@ -573,9 +583,12 @@ declare function clean(input: string): string;
|
|
|
573
583
|
*/
|
|
574
584
|
declare function normalize(input: string): string;
|
|
575
585
|
/**
|
|
576
|
-
* Convert accented
|
|
586
|
+
* Convert accented Latin letters, Greek and Cyrillic to ASCII equivalents.
|
|
587
|
+
* Letters without an explicit mapping lose their diacritics (via Unicode NFD);
|
|
588
|
+
* characters from other scripts are left unchanged.
|
|
577
589
|
* @example latinise('Héllo Wörld') // 'Hello World'
|
|
578
590
|
* @example latinise('Cześć') // 'Czesc'
|
|
591
|
+
* @example latinise('Αθήνα') // 'Athina'
|
|
579
592
|
*/
|
|
580
593
|
declare function latinise(input: string): string;
|
|
581
594
|
/**
|
|
@@ -622,7 +635,9 @@ declare function unmask(input: string, pattern: string, options?: MaskOptions):
|
|
|
622
635
|
*/
|
|
623
636
|
declare function ordinalize(num: number, locale?: string): string;
|
|
624
637
|
/**
|
|
625
|
-
* Format number as currency
|
|
638
|
+
* Format number as currency.
|
|
639
|
+
* Invalid currency codes or locales throw a RangeError (from Intl.NumberFormat)
|
|
640
|
+
* instead of silently formatting the amount as dollars.
|
|
626
641
|
* @example formatCurrency(1234.56, { locale: 'en-US', currency: 'USD' }) // '$1,234.56'
|
|
627
642
|
*/
|
|
628
643
|
declare function formatCurrency(amount: number, options?: CurrencyOptions): string;
|
|
@@ -643,10 +658,10 @@ declare function formatNumber(input: string | number, options?: {
|
|
|
643
658
|
*/
|
|
644
659
|
|
|
645
660
|
/**
|
|
646
|
-
* Calculate Levenshtein edit distance
|
|
661
|
+
* Calculate Levenshtein edit distance (counted in Unicode code points)
|
|
647
662
|
* @example levenshtein('kitten', 'sitting') // 3
|
|
648
663
|
*/
|
|
649
|
-
declare function levenshtein(
|
|
664
|
+
declare function levenshtein(aStr: string, bStr: string): number;
|
|
650
665
|
/**
|
|
651
666
|
* Calculate normalized Levenshtein similarity ratio (0-1)
|
|
652
667
|
* @example levenshteinRatio('kitten', 'sitting') // 0.571...
|
|
@@ -661,12 +676,12 @@ declare function dice(a: string, b: string): number;
|
|
|
661
676
|
* Calculate Jaro-Winkler similarity
|
|
662
677
|
* @example jaroWinkler('DWAYNE', 'DUANE') // ~0.84
|
|
663
678
|
*/
|
|
664
|
-
declare function jaroWinkler(
|
|
679
|
+
declare function jaroWinkler(aStr: string, bStr: string): number;
|
|
665
680
|
/**
|
|
666
|
-
* Calculate Hamming distance (for
|
|
681
|
+
* Calculate Hamming distance (for strings with the same number of code points)
|
|
667
682
|
* @example hamming('karolin', 'kathrin') // 3
|
|
668
683
|
*/
|
|
669
|
-
declare function hamming(
|
|
684
|
+
declare function hamming(aStr: string, bStr: string): number;
|
|
670
685
|
/**
|
|
671
686
|
* Calculate cosine similarity based on word frequency
|
|
672
687
|
* @example cosine('hello world', 'world hello') // 1.0
|
|
@@ -676,7 +691,7 @@ declare function cosine(a: string, b: string): number;
|
|
|
676
691
|
* Find the longest common subsequence
|
|
677
692
|
* @example lcs('ABCDGH', 'AEDFHR') // 'ADH'
|
|
678
693
|
*/
|
|
679
|
-
declare function lcs(
|
|
694
|
+
declare function lcs(aStr: string, bStr: string): string;
|
|
680
695
|
/**
|
|
681
696
|
* Get the length of the longest common subsequence
|
|
682
697
|
* @example lcsLength('ABCDGH', 'AEDFHR') // 3
|
|
@@ -708,8 +723,9 @@ declare function findSimilar(input: string, candidates: string[], options?: Simi
|
|
|
708
723
|
*/
|
|
709
724
|
declare function wordCount(input: string): number;
|
|
710
725
|
/**
|
|
711
|
-
* Count characters in a string
|
|
726
|
+
* Count characters (grapheme clusters) in a string
|
|
712
727
|
* @example charCount('Hello') // 5
|
|
728
|
+
* @example charCount('👨👩👧👦') // 1
|
|
713
729
|
* @example charCount('Hello World', { ignoreSpaces: true }) // 10
|
|
714
730
|
*/
|
|
715
731
|
declare function charCount(input: string, options?: AnalysisOptions): number;
|
|
@@ -836,17 +852,17 @@ declare function diffLines(oldStr: string, newStr: string): DiffResult[];
|
|
|
836
852
|
*/
|
|
837
853
|
declare function diff(oldStr: string, newStr: string, options?: DiffOptions): DiffResult[];
|
|
838
854
|
/**
|
|
839
|
-
* Create a unified diff patch
|
|
855
|
+
* Create a unified diff patch (3 lines of context, one hunk per group of changes)
|
|
840
856
|
* @example createPatch('file.txt', 'old content', 'new content')
|
|
841
857
|
*/
|
|
842
858
|
declare function createPatch(fileName: string, oldStr: string, newStr: string, _options?: DiffOptions): string;
|
|
843
859
|
/**
|
|
844
|
-
* Apply a patch to a string
|
|
860
|
+
* Apply a unified diff patch to a string
|
|
845
861
|
* @example applyPatch(originalText, patchString)
|
|
846
862
|
*/
|
|
847
863
|
declare function applyPatch(input: string, patch: string): string;
|
|
848
864
|
/**
|
|
849
|
-
* Reverse a patch (swap add and remove)
|
|
865
|
+
* Reverse a patch (swap add and remove, file names and hunk ranges)
|
|
850
866
|
*/
|
|
851
867
|
declare function reversePatch(patch: string): string;
|
|
852
868
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as TruncateOptions, S as SlugifyOptions, a as TemplateOptions, A as AnalysisOptions, F as FrequencyResult, b as StrKitOptions, c as SearchOptions, d as SimilarityOptions, D as DiffResult, e as DiffOptions, M as MaskOptions, C as CurrencyOptions, f as MatchResult, g as StrKitLocale, h as StrKitPlugin } from './types-
|
|
2
|
-
export { P as PatchHunk, i as PatchResult, k as StrKitConfig, j as StrKitKernel } from './types-
|
|
1
|
+
import { T as TruncateOptions, S as SlugifyOptions, a as TemplateOptions, A as AnalysisOptions, F as FrequencyResult, b as StrKitOptions, c as SearchOptions, d as SimilarityOptions, D as DiffResult, e as DiffOptions, M as MaskOptions, C as CurrencyOptions, f as MatchResult, g as StrKitLocale, h as StrKitPlugin } from './types-C3PxNZVq.js';
|
|
2
|
+
export { P as PatchHunk, i as PatchResult, k as StrKitConfig, j as StrKitKernel } from './types-C3PxNZVq.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* StrKit Chain Interface
|
|
@@ -250,17 +250,18 @@ declare function trimStart(input: string, chars?: string): string;
|
|
|
250
250
|
*/
|
|
251
251
|
declare function trimEnd(input: string, chars?: string): string;
|
|
252
252
|
/**
|
|
253
|
-
* Pad string on both sides to reach target length
|
|
253
|
+
* Pad string on both sides to reach target length.
|
|
254
|
+
* Lengths are measured in grapheme clusters (user-perceived characters).
|
|
254
255
|
* @example pad('hello', 11, '-') // '---hello---'
|
|
255
256
|
*/
|
|
256
257
|
declare function pad(input: string, length: number, char?: string): string;
|
|
257
258
|
/**
|
|
258
|
-
* Pad string on start to reach target length
|
|
259
|
+
* Pad string on start to reach target length (measured in grapheme clusters)
|
|
259
260
|
* @example padStart('5', 3, '0') // '005'
|
|
260
261
|
*/
|
|
261
262
|
declare function padStart(input: string, length: number, char?: string): string;
|
|
262
263
|
/**
|
|
263
|
-
* Pad string on end to reach target length
|
|
264
|
+
* Pad string on end to reach target length (measured in grapheme clusters)
|
|
264
265
|
* @example padEnd('5', 3, '0') // '500'
|
|
265
266
|
*/
|
|
266
267
|
declare function padEnd(input: string, length: number, char?: string): string;
|
|
@@ -270,12 +271,15 @@ declare function padEnd(input: string, length: number, char?: string): string;
|
|
|
270
271
|
*/
|
|
271
272
|
declare function repeat(input: string, count: number): string;
|
|
272
273
|
/**
|
|
273
|
-
* Reverse string (
|
|
274
|
+
* Reverse string by grapheme cluster (emoji sequences, flags and combining
|
|
275
|
+
* marks stay intact)
|
|
274
276
|
* @example reverse('hello') // 'olleh'
|
|
275
277
|
*/
|
|
276
278
|
declare function reverse(input: string): string;
|
|
277
279
|
/**
|
|
278
|
-
* Truncate string with ellipsis
|
|
280
|
+
* Truncate string with ellipsis.
|
|
281
|
+
* `length` is the maximum result length in grapheme clusters, ellipsis included,
|
|
282
|
+
* so emoji sequences and surrogate pairs are never cut in half.
|
|
279
283
|
* @example truncate('hello world', 8) // 'hello...'
|
|
280
284
|
* @example truncate('hello world', 8, { position: 'middle' }) // 'hel...ld'
|
|
281
285
|
*/
|
|
@@ -373,8 +377,9 @@ declare function lines(input: string): string[];
|
|
|
373
377
|
*/
|
|
374
378
|
declare function words(input: string): string[];
|
|
375
379
|
/**
|
|
376
|
-
* Split string into
|
|
380
|
+
* Split string into grapheme clusters (user-perceived characters)
|
|
377
381
|
* @example chars('hello') // ['h', 'e', 'l', 'l', 'o']
|
|
382
|
+
* @example chars('👨👩👧🇹🇷') // ['👨👩👧', '🇹🇷']
|
|
378
383
|
*/
|
|
379
384
|
declare function chars(input: string): string[];
|
|
380
385
|
|
|
@@ -542,9 +547,12 @@ declare function unescapeHtml(input: string): string;
|
|
|
542
547
|
*/
|
|
543
548
|
declare function escapeRegex(input: string): string;
|
|
544
549
|
/**
|
|
545
|
-
* Create URL-safe slug
|
|
550
|
+
* Create URL-safe slug.
|
|
551
|
+
* Accented Latin, Greek and Cyrillic letters are transliterated; with a `locale`
|
|
552
|
+
* option the locale's transliteration table is applied first.
|
|
546
553
|
* @example slugify('Hello World!') // 'hello-world'
|
|
547
554
|
* @example slugify('Héllo Wörld!') // 'hello-world'
|
|
555
|
+
* @example slugify('Привет мир') // 'privet-mir'
|
|
548
556
|
*/
|
|
549
557
|
declare function slugify(input: string, options?: SlugifyOptions): string;
|
|
550
558
|
/**
|
|
@@ -553,12 +561,14 @@ declare function slugify(input: string, options?: SlugifyOptions): string;
|
|
|
553
561
|
*/
|
|
554
562
|
declare function sanitizeFilename(input: string): string;
|
|
555
563
|
/**
|
|
556
|
-
* Remove all HTML tags
|
|
564
|
+
* Remove all HTML tags, plus the content of `<script>` and `<style>` elements.
|
|
565
|
+
* The result is plain text; it is not a sanitizer for HTML output (use escapeHtml).
|
|
557
566
|
* @example stripHtml('<p>Hello <b>World</b></p>') // 'Hello World'
|
|
558
567
|
*/
|
|
559
568
|
declare function stripHtml(input: string): string;
|
|
560
569
|
/**
|
|
561
|
-
* Remove HTML tags except allowed ones
|
|
570
|
+
* Remove HTML tags except allowed ones.
|
|
571
|
+
* Allowed tags are kept verbatim, attributes included, so this is not an XSS sanitizer.
|
|
562
572
|
* @example stripTags('<p>Hello <b>World</b></p>', ['p']) // '<p>Hello World</p>'
|
|
563
573
|
*/
|
|
564
574
|
declare function stripTags(input: string, allowed?: string[]): string;
|
|
@@ -573,9 +583,12 @@ declare function clean(input: string): string;
|
|
|
573
583
|
*/
|
|
574
584
|
declare function normalize(input: string): string;
|
|
575
585
|
/**
|
|
576
|
-
* Convert accented
|
|
586
|
+
* Convert accented Latin letters, Greek and Cyrillic to ASCII equivalents.
|
|
587
|
+
* Letters without an explicit mapping lose their diacritics (via Unicode NFD);
|
|
588
|
+
* characters from other scripts are left unchanged.
|
|
577
589
|
* @example latinise('Héllo Wörld') // 'Hello World'
|
|
578
590
|
* @example latinise('Cześć') // 'Czesc'
|
|
591
|
+
* @example latinise('Αθήνα') // 'Athina'
|
|
579
592
|
*/
|
|
580
593
|
declare function latinise(input: string): string;
|
|
581
594
|
/**
|
|
@@ -622,7 +635,9 @@ declare function unmask(input: string, pattern: string, options?: MaskOptions):
|
|
|
622
635
|
*/
|
|
623
636
|
declare function ordinalize(num: number, locale?: string): string;
|
|
624
637
|
/**
|
|
625
|
-
* Format number as currency
|
|
638
|
+
* Format number as currency.
|
|
639
|
+
* Invalid currency codes or locales throw a RangeError (from Intl.NumberFormat)
|
|
640
|
+
* instead of silently formatting the amount as dollars.
|
|
626
641
|
* @example formatCurrency(1234.56, { locale: 'en-US', currency: 'USD' }) // '$1,234.56'
|
|
627
642
|
*/
|
|
628
643
|
declare function formatCurrency(amount: number, options?: CurrencyOptions): string;
|
|
@@ -643,10 +658,10 @@ declare function formatNumber(input: string | number, options?: {
|
|
|
643
658
|
*/
|
|
644
659
|
|
|
645
660
|
/**
|
|
646
|
-
* Calculate Levenshtein edit distance
|
|
661
|
+
* Calculate Levenshtein edit distance (counted in Unicode code points)
|
|
647
662
|
* @example levenshtein('kitten', 'sitting') // 3
|
|
648
663
|
*/
|
|
649
|
-
declare function levenshtein(
|
|
664
|
+
declare function levenshtein(aStr: string, bStr: string): number;
|
|
650
665
|
/**
|
|
651
666
|
* Calculate normalized Levenshtein similarity ratio (0-1)
|
|
652
667
|
* @example levenshteinRatio('kitten', 'sitting') // 0.571...
|
|
@@ -661,12 +676,12 @@ declare function dice(a: string, b: string): number;
|
|
|
661
676
|
* Calculate Jaro-Winkler similarity
|
|
662
677
|
* @example jaroWinkler('DWAYNE', 'DUANE') // ~0.84
|
|
663
678
|
*/
|
|
664
|
-
declare function jaroWinkler(
|
|
679
|
+
declare function jaroWinkler(aStr: string, bStr: string): number;
|
|
665
680
|
/**
|
|
666
|
-
* Calculate Hamming distance (for
|
|
681
|
+
* Calculate Hamming distance (for strings with the same number of code points)
|
|
667
682
|
* @example hamming('karolin', 'kathrin') // 3
|
|
668
683
|
*/
|
|
669
|
-
declare function hamming(
|
|
684
|
+
declare function hamming(aStr: string, bStr: string): number;
|
|
670
685
|
/**
|
|
671
686
|
* Calculate cosine similarity based on word frequency
|
|
672
687
|
* @example cosine('hello world', 'world hello') // 1.0
|
|
@@ -676,7 +691,7 @@ declare function cosine(a: string, b: string): number;
|
|
|
676
691
|
* Find the longest common subsequence
|
|
677
692
|
* @example lcs('ABCDGH', 'AEDFHR') // 'ADH'
|
|
678
693
|
*/
|
|
679
|
-
declare function lcs(
|
|
694
|
+
declare function lcs(aStr: string, bStr: string): string;
|
|
680
695
|
/**
|
|
681
696
|
* Get the length of the longest common subsequence
|
|
682
697
|
* @example lcsLength('ABCDGH', 'AEDFHR') // 3
|
|
@@ -708,8 +723,9 @@ declare function findSimilar(input: string, candidates: string[], options?: Simi
|
|
|
708
723
|
*/
|
|
709
724
|
declare function wordCount(input: string): number;
|
|
710
725
|
/**
|
|
711
|
-
* Count characters in a string
|
|
726
|
+
* Count characters (grapheme clusters) in a string
|
|
712
727
|
* @example charCount('Hello') // 5
|
|
728
|
+
* @example charCount('👨👩👧👦') // 1
|
|
713
729
|
* @example charCount('Hello World', { ignoreSpaces: true }) // 10
|
|
714
730
|
*/
|
|
715
731
|
declare function charCount(input: string, options?: AnalysisOptions): number;
|
|
@@ -836,17 +852,17 @@ declare function diffLines(oldStr: string, newStr: string): DiffResult[];
|
|
|
836
852
|
*/
|
|
837
853
|
declare function diff(oldStr: string, newStr: string, options?: DiffOptions): DiffResult[];
|
|
838
854
|
/**
|
|
839
|
-
* Create a unified diff patch
|
|
855
|
+
* Create a unified diff patch (3 lines of context, one hunk per group of changes)
|
|
840
856
|
* @example createPatch('file.txt', 'old content', 'new content')
|
|
841
857
|
*/
|
|
842
858
|
declare function createPatch(fileName: string, oldStr: string, newStr: string, _options?: DiffOptions): string;
|
|
843
859
|
/**
|
|
844
|
-
* Apply a patch to a string
|
|
860
|
+
* Apply a unified diff patch to a string
|
|
845
861
|
* @example applyPatch(originalText, patchString)
|
|
846
862
|
*/
|
|
847
863
|
declare function applyPatch(input: string, patch: string): string;
|
|
848
864
|
/**
|
|
849
|
-
* Reverse a patch (swap add and remove)
|
|
865
|
+
* Reverse a patch (swap add and remove, file names and hunk ranges)
|
|
850
866
|
*/
|
|
851
867
|
declare function reversePatch(patch: string): string;
|
|
852
868
|
|