@samline/string 1.0.0 → 2.0.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/CHANGELOG.md +72 -3
- package/README.md +96 -33
- package/dist/browser/string.global.js +1 -1
- package/dist/browser/string.global.js.map +1 -1
- package/dist/chunk-GAAYAWX5.js +567 -0
- package/dist/chunk-GAAYAWX5.js.map +1 -0
- package/dist/index.cjs +503 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +280 -9
- package/dist/index.d.ts +280 -9
- package/dist/index.js +1 -1
- package/dist/vanilla/index.cjs +1239 -15
- package/dist/vanilla/index.cjs.map +1 -1
- package/dist/vanilla/index.d.cts +254 -1
- package/dist/vanilla/index.d.ts +254 -1
- package/dist/vanilla/index.js +714 -1
- package/dist/vanilla/index.js.map +1 -1
- package/package.json +56 -8
- package/dist/chunk-7CEOX6CZ.js +0 -105
- package/dist/chunk-7CEOX6CZ.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -8,8 +8,33 @@
|
|
|
8
8
|
*/
|
|
9
9
|
declare const words: (input: string) => string[];
|
|
10
10
|
|
|
11
|
+
interface RemoveAccentsOptions {
|
|
12
|
+
/**
|
|
13
|
+
* Extra replacements, applied before and after accents are removed, for
|
|
14
|
+
* scripts or conventions the built-in table does not cover:
|
|
15
|
+
* `{ charMap: CYRILLIC }`, `{ charMap: { ä: 'ae' } }`. Keys may be longer
|
|
16
|
+
* than one character; the longest key wins.
|
|
17
|
+
*/
|
|
18
|
+
charMap?: Readonly<Record<string, string>>;
|
|
19
|
+
}
|
|
11
20
|
/** Remove diacritics and transliterate common Latin letters: `Ñandú Straße` → `Nandu Strasse`. */
|
|
12
|
-
declare const removeAccents: (input: string) => string;
|
|
21
|
+
declare const removeAccents: (input: string, { charMap }?: RemoveAccentsOptions) => string;
|
|
22
|
+
|
|
23
|
+
/** A map from characters (or short sequences) to their Latin replacement. */
|
|
24
|
+
type CharMap = Readonly<Record<string, string>>;
|
|
25
|
+
/** Russian, Ukrainian, Belarusian and Bulgarian letters: `Щука` → `Shchuka`. */
|
|
26
|
+
declare const CYRILLIC: CharMap;
|
|
27
|
+
/** Modern Greek letters: `Αθήνα` → `Athina`. */
|
|
28
|
+
declare const GREEK: CharMap;
|
|
29
|
+
/** German umlauts as two letters, the way German speakers write them: `Müller` → `Mueller`. */
|
|
30
|
+
declare const GERMAN: CharMap;
|
|
31
|
+
/** Presets by name, for the `data-string-transliterate` attribute. */
|
|
32
|
+
declare const CHAR_MAPS: {
|
|
33
|
+
readonly cyrillic: Readonly<Record<string, string>>;
|
|
34
|
+
readonly greek: Readonly<Record<string, string>>;
|
|
35
|
+
readonly german: Readonly<Record<string, string>>;
|
|
36
|
+
};
|
|
37
|
+
type CharMapName = keyof typeof CHAR_MAPS;
|
|
13
38
|
|
|
14
39
|
interface CaseOptions {
|
|
15
40
|
/** Locale for upper/lower casing, for example `'tr'` for Turkish dotted i. */
|
|
@@ -25,6 +50,10 @@ declare const kebabCase: (input: string, { locale }?: CaseOptions) => string;
|
|
|
25
50
|
declare const snakeCase: (input: string, { locale }?: CaseOptions) => string;
|
|
26
51
|
/** `Hello World` → `hello.world` */
|
|
27
52
|
declare const dotCase: (input: string, { locale }?: CaseOptions) => string;
|
|
53
|
+
/** `Hello World` → `hello/world` */
|
|
54
|
+
declare const pathCase: (input: string, { locale }?: CaseOptions) => string;
|
|
55
|
+
/** `hello world` → `Hello-World`, the casing of HTTP headers. */
|
|
56
|
+
declare const trainCase: (input: string, { locale }?: CaseOptions) => string;
|
|
28
57
|
/** `Hello World` → `HELLO_WORLD` */
|
|
29
58
|
declare const constantCase: (input: string, { locale }?: CaseOptions) => string;
|
|
30
59
|
interface TitleCaseOptions extends CaseOptions {
|
|
@@ -46,6 +75,7 @@ declare const capitalize: (input: string, { locale }?: CaseOptions) => string;
|
|
|
46
75
|
/** Lower-case the first letter and leave the rest untouched: `Hello` → `hello`. */
|
|
47
76
|
declare const uncapitalize: (input: string, { locale }?: CaseOptions) => string;
|
|
48
77
|
|
|
78
|
+
type Replacements = Readonly<Record<string, string>> | ReadonlyArray<readonly [string | RegExp, string]>;
|
|
49
79
|
interface SlugifyOptions {
|
|
50
80
|
/** Word separator. Defaults to `'-'`. */
|
|
51
81
|
separator?: string;
|
|
@@ -53,9 +83,18 @@ interface SlugifyOptions {
|
|
|
53
83
|
lower?: boolean;
|
|
54
84
|
/**
|
|
55
85
|
* Replacements applied before anything else, for example
|
|
56
|
-
* `{ '&': 'y', '%': 'por ciento' }`.
|
|
86
|
+
* `{ '&': 'y', '%': 'por ciento' }`. Object keys are matched literally; for
|
|
87
|
+
* patterns pass pairs: `[[/\bC\+\+/g, 'cpp'], ['&', 'and']]` (use the `g` flag
|
|
88
|
+
* to replace every match).
|
|
89
|
+
*/
|
|
90
|
+
replacements?: Replacements;
|
|
91
|
+
/**
|
|
92
|
+
* Extra transliteration, for example `CYRILLIC`, `GREEK`, `GERMAN` or your
|
|
93
|
+
* own `{ ä: 'ae' }`. See `removeAccents`.
|
|
57
94
|
*/
|
|
58
|
-
|
|
95
|
+
charMap?: Readonly<Record<string, string>>;
|
|
96
|
+
/** Characters kept as they are, for example `'.'` for `v1.2` or `'_'`. */
|
|
97
|
+
preserve?: string;
|
|
59
98
|
/** Maximum length; cuts at a separator when possible. */
|
|
60
99
|
maxLength?: number;
|
|
61
100
|
/**
|
|
@@ -73,19 +112,43 @@ interface SlugifyOptions {
|
|
|
73
112
|
* only ASCII letters and digits, and collapses everything else into one
|
|
74
113
|
* separator.
|
|
75
114
|
*/
|
|
76
|
-
declare const slugify: (input: string, { separator, lower, replacements, maxLength, trim, locale, }?: SlugifyOptions) => string;
|
|
115
|
+
declare const slugify: (input: string, { separator, lower, replacements, maxLength, trim, locale, charMap, preserve, }?: SlugifyOptions) => string;
|
|
116
|
+
interface UniqueSlugOptions extends SlugifyOptions {
|
|
117
|
+
/** First number tried. Defaults to `2`, so the second "Hola" becomes `hola-2`. */
|
|
118
|
+
start?: number;
|
|
119
|
+
}
|
|
120
|
+
/** Slugs already in use: a list, a `Set`, or a function that answers for one slug. */
|
|
121
|
+
type TakenSlugs = Iterable<string> | ((slug: string) => boolean);
|
|
122
|
+
/**
|
|
123
|
+
* A slug that is not `taken`: `uniqueSlug('Hola', ['hola', 'hola-2'])` →
|
|
124
|
+
* `'hola-3'`. The number is joined with the separator, and with `maxLength`
|
|
125
|
+
* the base is shortened so the number always fits.
|
|
126
|
+
*
|
|
127
|
+
* When editing a record, leave its own current slug out of `taken`.
|
|
128
|
+
*/
|
|
129
|
+
declare const uniqueSlug: (input: string, taken: TakenSlugs, { start, ...options }?: UniqueSlugOptions) => string;
|
|
77
130
|
|
|
131
|
+
type TruncatePosition = 'end' | 'middle' | 'start';
|
|
78
132
|
interface TruncateOptions {
|
|
79
133
|
/** Appended when the text is cut. Defaults to `'…'`. Counts toward `length`. */
|
|
80
134
|
ellipsis?: string;
|
|
81
|
-
/**
|
|
135
|
+
/**
|
|
136
|
+
* Cut at a whole word instead of mid-word. Defaults to `true`. Applies to
|
|
137
|
+
* `'end'` and `'start'`; `'middle'` always keeps exact characters.
|
|
138
|
+
*/
|
|
82
139
|
wordBoundary?: boolean;
|
|
140
|
+
/**
|
|
141
|
+
* Where the text is cut. `'end'` (default) keeps the beginning,
|
|
142
|
+
* `'start'` keeps the ending, and `'middle'` keeps both ends, which suits
|
|
143
|
+
* file names and IDs: `annual-report-2026-final.pdf` at 19 → `annual-re…final.pdf`.
|
|
144
|
+
*/
|
|
145
|
+
position?: TruncatePosition;
|
|
83
146
|
}
|
|
84
147
|
/**
|
|
85
|
-
* Shorten text to at most `length` characters
|
|
86
|
-
*
|
|
148
|
+
* Shorten text to at most `length` characters. Characters are graphemes, so
|
|
149
|
+
* emoji (👨👩👧, 🇲🇽) and accented letters are never split.
|
|
87
150
|
*/
|
|
88
|
-
declare const truncate: (input: string, length: number, { ellipsis, wordBoundary }?: TruncateOptions) => string;
|
|
151
|
+
declare const truncate: (input: string, length: number, { ellipsis, wordBoundary, position }?: TruncateOptions) => string;
|
|
89
152
|
interface InitialsOptions {
|
|
90
153
|
/** Maximum number of letters. Defaults to `2`. */
|
|
91
154
|
max?: number;
|
|
@@ -94,4 +157,212 @@ interface InitialsOptions {
|
|
|
94
157
|
/** `Samuel Olvera` → `SO`, `ana maría lópez` → `AM` */
|
|
95
158
|
declare const initials: (input: string, { max, locale }?: InitialsOptions) => string;
|
|
96
159
|
|
|
97
|
-
|
|
160
|
+
/** Every conversion `convert()` and the `data-string` attribute understand. */
|
|
161
|
+
declare const CONVERSIONS: readonly ["camel", "pascal", "kebab", "snake", "dot", "path", "constant", "train", "title", "sentence", "capitalize", "uncapitalize", "lower", "upper", "slug", "accents", "truncate", "initials"];
|
|
162
|
+
type Conversion = (typeof CONVERSIONS)[number];
|
|
163
|
+
interface ConvertOptions extends TitleCaseOptions, Omit<SlugifyOptions, 'locale'>, TruncateOptions, InitialsOptions {
|
|
164
|
+
/** Maximum length for `'truncate'`. Without it, `'truncate'` returns the text unchanged. */
|
|
165
|
+
length?: number;
|
|
166
|
+
/** Slugs already in use: `'slug'` then returns a free one (`hola-2`). See `uniqueSlug`. */
|
|
167
|
+
taken?: TakenSlugs;
|
|
168
|
+
}
|
|
169
|
+
/** True when `value` names a conversion, for example `'kebab'` or `'slug'`. */
|
|
170
|
+
declare const isConversion: (value: unknown) => value is Conversion;
|
|
171
|
+
/**
|
|
172
|
+
* Run a conversion by name, so it can come from configuration, a select menu
|
|
173
|
+
* or an HTML attribute: `convert('Hello World', 'kebab')` → `hello-world`.
|
|
174
|
+
*
|
|
175
|
+
* Options are passed through to the underlying function (`smallWords` for
|
|
176
|
+
* `'title'`, `separator` and `replacements` for `'slug'`, `length` and
|
|
177
|
+
* `position` for `'truncate'`, `max` for `'initials'`, `locale` for all of
|
|
178
|
+
* them). An unknown name returns the text unchanged.
|
|
179
|
+
*/
|
|
180
|
+
declare const convert: (input: string, to: Conversion, options?: ConvertOptions) => string;
|
|
181
|
+
|
|
182
|
+
interface FoldOptions {
|
|
183
|
+
/** Locale for lower-casing, for example `'tr'` so `I` folds like `ı`. */
|
|
184
|
+
locale?: string | string[];
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Fold text for comparison: lower case, no accents, common letters
|
|
188
|
+
* transliterated and full-width forms mapped to ASCII.
|
|
189
|
+
* `Ñandú ABC Straße` → `nandu abc strasse`.
|
|
190
|
+
*/
|
|
191
|
+
declare const fold: (input: string, { locale }?: FoldOptions) => string;
|
|
192
|
+
interface MatchOptions extends FoldOptions {
|
|
193
|
+
/**
|
|
194
|
+
* Treat every word of the query as its own term. Defaults to `true`:
|
|
195
|
+
* `'cafe mex'` matches `México: Café de olla`. `false` matches the query
|
|
196
|
+
* as one phrase.
|
|
197
|
+
*/
|
|
198
|
+
split?: boolean;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Accent- and case-insensitive search: `contains('Café de olla', 'CAFE')` is
|
|
202
|
+
* `true`. Every term must appear; an empty query matches everything.
|
|
203
|
+
*/
|
|
204
|
+
declare const contains: (input: string, query: string, options?: MatchOptions) => boolean;
|
|
205
|
+
interface HighlightSegment {
|
|
206
|
+
/** A piece of the original text, unchanged. */
|
|
207
|
+
text: string;
|
|
208
|
+
/** True when the piece matches the query. */
|
|
209
|
+
match: boolean;
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Split text into matching and non-matching pieces of the original text, for
|
|
213
|
+
* highlighting search results without building HTML strings:
|
|
214
|
+
* `highlight('Café de olla', 'cafe')` →
|
|
215
|
+
* `[{ text: 'Café', match: true }, { text: ' de olla', match: false }]`.
|
|
216
|
+
*
|
|
217
|
+
* Matching ignores accents and case, like `contains`; terms do not need to
|
|
218
|
+
* all appear.
|
|
219
|
+
*/
|
|
220
|
+
declare const highlight: (input: string, query: string, options?: MatchOptions) => HighlightSegment[];
|
|
221
|
+
interface CompareOptions {
|
|
222
|
+
/** Locale for ordering. Defaults to the runtime's locale. */
|
|
223
|
+
locale?: string | string[];
|
|
224
|
+
/**
|
|
225
|
+
* What counts as different, as in `Intl.Collator`. Defaults to `'base'`:
|
|
226
|
+
* `a`, `á` and `A` sort as equal.
|
|
227
|
+
*/
|
|
228
|
+
sensitivity?: 'base' | 'accent' | 'case' | 'variant';
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Natural, locale-aware ordering: numbers compare by value and accents are
|
|
232
|
+
* ignored, so `file2` comes before `file10` and `Árbol` sits with `arbol`.
|
|
233
|
+
* Pass it straight to sort: `names.sort(compareNatural)`.
|
|
234
|
+
*/
|
|
235
|
+
declare const compareNatural: (a: string, b: string, { locale, sensitivity }?: CompareOptions) => number;
|
|
236
|
+
/**
|
|
237
|
+
* Levenshtein distance in code points: the number of single-character
|
|
238
|
+
* insertions, deletions and substitutions between two strings.
|
|
239
|
+
* `distance('kitten', 'sitting')` → `3`.
|
|
240
|
+
*/
|
|
241
|
+
declare const distance: (a: string, b: string) => number;
|
|
242
|
+
interface SimilarityOptions extends FoldOptions {
|
|
243
|
+
/** Compare folded text, ignoring accents and case. Defaults to `true`. */
|
|
244
|
+
fold?: boolean;
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* How alike two strings are, from `0` (nothing in common) to `1` (equal),
|
|
248
|
+
* based on `distance`. Accents and case are ignored unless `fold: false`.
|
|
249
|
+
* `similarity('Mexico', 'México')` → `1`.
|
|
250
|
+
*/
|
|
251
|
+
declare const similarity: (a: string, b: string, { fold: shouldFold, locale }?: SimilarityOptions) => number;
|
|
252
|
+
interface ClosestOptions extends SimilarityOptions {
|
|
253
|
+
/** Minimum similarity, from `0` to `1`. Defaults to `0.5`. */
|
|
254
|
+
threshold?: number;
|
|
255
|
+
/**
|
|
256
|
+
* Also compare the input with the start of each word of a longer
|
|
257
|
+
* candidate, so `horchatta` finds `Horchata de arroz`. Needs at least three
|
|
258
|
+
* characters. Defaults to `true`.
|
|
259
|
+
*/
|
|
260
|
+
partial?: boolean;
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* The candidate most similar to `input`, for "Did you mean…?" hints, or
|
|
264
|
+
* `undefined` when none reaches `threshold`.
|
|
265
|
+
* `closest('mexcio', ['Chile', 'México', 'Perú'])` → `'México'`.
|
|
266
|
+
*/
|
|
267
|
+
declare const closest: <T extends string>(input: string, candidates: Iterable<T>, { threshold, partial, ...options }?: ClosestOptions) => T | undefined;
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* Split text into user-perceived characters, so a family emoji (👨👩👧), a
|
|
271
|
+
* flag (🇲🇽) or a letter with a combining accent counts as one:
|
|
272
|
+
* `graphemes('🇲🇽é')` → `['🇲🇽', 'é']`. Falls back to code points without
|
|
273
|
+
* `Intl.Segmenter`.
|
|
274
|
+
*/
|
|
275
|
+
declare const graphemes: (input: string) => string[];
|
|
276
|
+
|
|
277
|
+
interface WordCountOptions {
|
|
278
|
+
/** Locale for word boundaries, which matters for Chinese, Japanese or Thai. */
|
|
279
|
+
locale?: string | string[];
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Count the words people read, with `Intl.Segmenter` when available, so
|
|
283
|
+
* punctuation is ignored and Chinese or Japanese text is split correctly:
|
|
284
|
+
* `wordCount('¡Hola, mundo! It's 2026.')` → `4`.
|
|
285
|
+
*/
|
|
286
|
+
declare const wordCount: (input: string, { locale }?: WordCountOptions) => number;
|
|
287
|
+
interface ReadingTimeOptions extends WordCountOptions {
|
|
288
|
+
/** Reading speed. Defaults to `200` words per minute. */
|
|
289
|
+
wordsPerMinute?: number;
|
|
290
|
+
}
|
|
291
|
+
interface ReadingTime {
|
|
292
|
+
words: number;
|
|
293
|
+
/** Whole minutes, rounded up; `1` for any text with words, `0` for none. */
|
|
294
|
+
minutes: number;
|
|
295
|
+
}
|
|
296
|
+
/** `readingTime(article)` → `{ words: 1240, minutes: 7 }`. */
|
|
297
|
+
declare const readingTime: (input: string, { wordsPerMinute, ...options }?: ReadingTimeOptions) => ReadingTime;
|
|
298
|
+
/** Plural forms by `Intl.PluralRules` category; `other` is required. */
|
|
299
|
+
interface PluralForms {
|
|
300
|
+
zero?: string;
|
|
301
|
+
one?: string;
|
|
302
|
+
two?: string;
|
|
303
|
+
few?: string;
|
|
304
|
+
many?: string;
|
|
305
|
+
other: string;
|
|
306
|
+
}
|
|
307
|
+
interface PluralizeOptions {
|
|
308
|
+
/** Locale for the plural rules and the number format. */
|
|
309
|
+
locale?: string | string[];
|
|
310
|
+
/** Use ordinal rules: `1st`, `2nd`, `3rd`, `4th`. Defaults to `false`. */
|
|
311
|
+
ordinal?: boolean;
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* Pick the right plural form for any language and put the formatted count
|
|
315
|
+
* where `#` is: `pluralize(1234, { one: '# file', other: '# files' })` →
|
|
316
|
+
* `'1,234 files'`. `zero` is used for `0` when you give it, in any language.
|
|
317
|
+
*/
|
|
318
|
+
declare const pluralize: (count: number, forms: PluralForms, { locale, ordinal }?: PluralizeOptions) => string;
|
|
319
|
+
interface TemplateOptions {
|
|
320
|
+
/**
|
|
321
|
+
* What to put where a value is missing (`undefined` or `null`): a string,
|
|
322
|
+
* or a function of the key. Defaults to keeping the placeholder as it is.
|
|
323
|
+
*/
|
|
324
|
+
missing?: string | ((key: string) => string);
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* Fill `{placeholders}` with values, including nested paths:
|
|
328
|
+
* `template('Hola {user.name}, tienes {count}', { user: { name: 'Ana' }, count: 3 })`
|
|
329
|
+
* → `'Hola Ana, tienes 3'`. Write `{{` and `}}` for literal braces.
|
|
330
|
+
*/
|
|
331
|
+
declare const template: (input: string, values: Readonly<Record<string, unknown>>, { missing }?: TemplateOptions) => string;
|
|
332
|
+
|
|
333
|
+
/** Make text safe inside HTML text and quoted attributes: `<b>` → `<b>`. */
|
|
334
|
+
declare const escapeHtml: (input: string) => string;
|
|
335
|
+
/**
|
|
336
|
+
* Decode numeric entities (`'`, `'`) and the common named ones
|
|
337
|
+
* (`&`, ` `, `…`…). Unknown entities are left as they are.
|
|
338
|
+
*/
|
|
339
|
+
declare const unescapeHtml: (input: string) => string;
|
|
340
|
+
/**
|
|
341
|
+
* Plain text from HTML, for excerpts, meta descriptions and search indexes:
|
|
342
|
+
* removes comments, `<script>` and `<style>` with their content and every
|
|
343
|
+
* tag, turns block tags into spaces, decodes entities and collapses spaces.
|
|
344
|
+
*
|
|
345
|
+
* The result is text: insert it with `textContent`. It is not an HTML
|
|
346
|
+
* sanitizer.
|
|
347
|
+
*/
|
|
348
|
+
declare const stripTags: (input: string) => string;
|
|
349
|
+
|
|
350
|
+
interface HashColorOptions {
|
|
351
|
+
/** Saturation in percent. Defaults to `55`. */
|
|
352
|
+
saturation?: number;
|
|
353
|
+
/** Highest lightness in percent. Defaults to `45`. */
|
|
354
|
+
lightness?: number;
|
|
355
|
+
/**
|
|
356
|
+
* Minimum contrast ratio of white text on the color; lightness is lowered
|
|
357
|
+
* until it is reached. Defaults to `4.5` (WCAG AA); `0` keeps `lightness`.
|
|
358
|
+
*/
|
|
359
|
+
contrast?: number;
|
|
360
|
+
}
|
|
361
|
+
/**
|
|
362
|
+
* A stable color for a name, for avatars and tags: the same text always gets
|
|
363
|
+
* the same hue, ignoring case, accents and surrounding spaces, and white text
|
|
364
|
+
* on it stays readable. `hashColor('Ana López')` → `'hsl(214 55% 45%)'`.
|
|
365
|
+
*/
|
|
366
|
+
declare const hashColor: (input: string, { saturation, lightness, contrast }?: HashColorOptions) => string;
|
|
367
|
+
|
|
368
|
+
export { CHAR_MAPS, CONVERSIONS, CYRILLIC, type CaseOptions, type CharMap, type CharMapName, type ClosestOptions, type CompareOptions, type Conversion, type ConvertOptions, type FoldOptions, GERMAN, GREEK, type HashColorOptions, type HighlightSegment, type InitialsOptions, type MatchOptions, type PluralForms, type PluralizeOptions, type ReadingTime, type ReadingTimeOptions, type RemoveAccentsOptions, type Replacements, type SimilarityOptions, type SlugifyOptions, type TakenSlugs, type TemplateOptions, type TitleCaseOptions, type TruncateOptions, type TruncatePosition, type UniqueSlugOptions, type WordCountOptions, camelCase, capitalize, closest, compareNatural, constantCase, contains, convert, distance, dotCase, escapeHtml, fold, graphemes, hashColor, highlight, initials, isConversion, kebabCase, pascalCase, pathCase, pluralize, readingTime, removeAccents, sentenceCase, similarity, slugify, snakeCase, stripTags, template, titleCase, trainCase, truncate, uncapitalize, unescapeHtml, uniqueSlug, wordCount, words };
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { camelCase, capitalize, constantCase, dotCase, initials, kebabCase, pascalCase, removeAccents, sentenceCase, slugify, snakeCase, titleCase, truncate, uncapitalize, words } from './chunk-
|
|
1
|
+
export { CHAR_MAPS, CONVERSIONS, CYRILLIC, GERMAN, GREEK, camelCase, capitalize, closest, compareNatural, constantCase, contains, convert, distance, dotCase, escapeHtml, fold, graphemes, hashColor, highlight, initials, isConversion, kebabCase, pascalCase, pathCase, pluralize, readingTime, removeAccents, sentenceCase, similarity, slugify, snakeCase, stripTags, template, titleCase, trainCase, truncate, uncapitalize, unescapeHtml, uniqueSlug, wordCount, words } from './chunk-GAAYAWX5.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
3
3
|
//# sourceMappingURL=index.js.map
|