@visulima/string 1.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 +5 -0
- package/LICENSE.md +77 -0
- package/README.md +880 -0
- package/dist/case/camel-case.cjs +59 -0
- package/dist/case/camel-case.d.cts +7 -0
- package/dist/case/camel-case.d.mts +7 -0
- package/dist/case/camel-case.d.ts +7 -0
- package/dist/case/camel-case.mjs +57 -0
- package/dist/case/capital-case.cjs +51 -0
- package/dist/case/capital-case.d.cts +7 -0
- package/dist/case/capital-case.d.mts +7 -0
- package/dist/case/capital-case.d.ts +7 -0
- package/dist/case/capital-case.mjs +49 -0
- package/dist/case/constant-case.cjs +11 -0
- package/dist/case/constant-case.d.cts +7 -0
- package/dist/case/constant-case.d.mts +7 -0
- package/dist/case/constant-case.d.ts +7 -0
- package/dist/case/constant-case.mjs +9 -0
- package/dist/case/dot-case.cjs +11 -0
- package/dist/case/dot-case.d.cts +7 -0
- package/dist/case/dot-case.d.mts +7 -0
- package/dist/case/dot-case.d.ts +7 -0
- package/dist/case/dot-case.mjs +9 -0
- package/dist/case/flat-case.cjs +11 -0
- package/dist/case/flat-case.d.cts +7 -0
- package/dist/case/flat-case.d.mts +7 -0
- package/dist/case/flat-case.d.ts +7 -0
- package/dist/case/flat-case.mjs +9 -0
- package/dist/case/flip-case.cjs +61 -0
- package/dist/case/flip-case.d.cts +8 -0
- package/dist/case/flip-case.d.mts +8 -0
- package/dist/case/flip-case.d.ts +8 -0
- package/dist/case/flip-case.mjs +57 -0
- package/dist/case/identify-case.cjs +30 -0
- package/dist/case/identify-case.d.cts +7 -0
- package/dist/case/identify-case.d.mts +7 -0
- package/dist/case/identify-case.d.ts +7 -0
- package/dist/case/identify-case.mjs +28 -0
- package/dist/case/index.cjs +47 -0
- package/dist/case/index.d.cts +26 -0
- package/dist/case/index.d.mts +26 -0
- package/dist/case/index.d.ts +26 -0
- package/dist/case/index.mjs +20 -0
- package/dist/case/kebab-case.cjs +61 -0
- package/dist/case/kebab-case.d.cts +11 -0
- package/dist/case/kebab-case.d.mts +11 -0
- package/dist/case/kebab-case.d.ts +11 -0
- package/dist/case/kebab-case.mjs +57 -0
- package/dist/case/lower-first.cjs +13 -0
- package/dist/case/lower-first.d.cts +7 -0
- package/dist/case/lower-first.d.mts +7 -0
- package/dist/case/lower-first.d.ts +7 -0
- package/dist/case/lower-first.mjs +11 -0
- package/dist/case/no-case.cjs +11 -0
- package/dist/case/no-case.d.cts +7 -0
- package/dist/case/no-case.d.mts +7 -0
- package/dist/case/no-case.d.ts +7 -0
- package/dist/case/no-case.mjs +9 -0
- package/dist/case/pascal-case.cjs +52 -0
- package/dist/case/pascal-case.d.cts +7 -0
- package/dist/case/pascal-case.d.mts +7 -0
- package/dist/case/pascal-case.d.ts +7 -0
- package/dist/case/pascal-case.mjs +50 -0
- package/dist/case/pascal-snake-case.cjs +32 -0
- package/dist/case/pascal-snake-case.d.cts +7 -0
- package/dist/case/pascal-snake-case.d.mts +7 -0
- package/dist/case/pascal-snake-case.d.ts +7 -0
- package/dist/case/pascal-snake-case.mjs +30 -0
- package/dist/case/path-case.cjs +11 -0
- package/dist/case/path-case.d.cts +7 -0
- package/dist/case/path-case.d.mts +7 -0
- package/dist/case/path-case.d.ts +7 -0
- package/dist/case/path-case.mjs +9 -0
- package/dist/case/sentence-case.cjs +58 -0
- package/dist/case/sentence-case.d.cts +7 -0
- package/dist/case/sentence-case.d.mts +7 -0
- package/dist/case/sentence-case.d.ts +7 -0
- package/dist/case/sentence-case.mjs +56 -0
- package/dist/case/snake-case.cjs +11 -0
- package/dist/case/snake-case.d.cts +7 -0
- package/dist/case/snake-case.d.mts +7 -0
- package/dist/case/snake-case.d.ts +7 -0
- package/dist/case/snake-case.mjs +9 -0
- package/dist/case/split-by-case.cjs +638 -0
- package/dist/case/split-by-case.d.cts +16 -0
- package/dist/case/split-by-case.d.mts +16 -0
- package/dist/case/split-by-case.d.ts +16 -0
- package/dist/case/split-by-case.mjs +634 -0
- package/dist/case/title-case.cjs +47 -0
- package/dist/case/title-case.d.cts +7 -0
- package/dist/case/title-case.d.mts +7 -0
- package/dist/case/title-case.d.ts +7 -0
- package/dist/case/title-case.mjs +45 -0
- package/dist/case/train-case.cjs +44 -0
- package/dist/case/train-case.d.cts +7 -0
- package/dist/case/train-case.d.mts +7 -0
- package/dist/case/train-case.d.ts +7 -0
- package/dist/case/train-case.mjs +42 -0
- package/dist/case/upper-first.cjs +13 -0
- package/dist/case/upper-first.d.cts +7 -0
- package/dist/case/upper-first.d.mts +7 -0
- package/dist/case/upper-first.d.ts +7 -0
- package/dist/case/upper-first.mjs +11 -0
- package/dist/get-string-truncated-width.cjs +386 -0
- package/dist/get-string-truncated-width.d.cts +25 -0
- package/dist/get-string-truncated-width.d.mts +25 -0
- package/dist/get-string-truncated-width.d.ts +25 -0
- package/dist/get-string-truncated-width.mjs +382 -0
- package/dist/get-string-width.cjs +11 -0
- package/dist/get-string-width.d.cts +6 -0
- package/dist/get-string-width.d.mts +6 -0
- package/dist/get-string-width.d.ts +6 -0
- package/dist/get-string-width.mjs +7 -0
- package/dist/index.cjs +60 -0
- package/dist/index.d.cts +43 -0
- package/dist/index.d.mts +43 -0
- package/dist/index.d.ts +43 -0
- package/dist/index.mjs +26 -0
- package/dist/native-string-types.d.cts +128 -0
- package/dist/native-string-types.d.mts +128 -0
- package/dist/native-string-types.d.ts +128 -0
- package/dist/outdent.cjs +122 -0
- package/dist/outdent.d.cts +15 -0
- package/dist/outdent.d.mts +15 -0
- package/dist/outdent.d.ts +15 -0
- package/dist/outdent.mjs +118 -0
- package/dist/packem_shared/LRUCache-Crb-m7cw.cjs +53 -0
- package/dist/packem_shared/LRUCache-udNErhWw.mjs +51 -0
- package/dist/packem_shared/WrapMode-BgOOthJV.mjs +545 -0
- package/dist/packem_shared/WrapMode-ZqTeXK8X.cjs +550 -0
- package/dist/packem_shared/constants-BnVGLrDr.mjs +99 -0
- package/dist/packem_shared/constants-HevSYUjU.cjs +149 -0
- package/dist/packem_shared/generate-cache-key-D8f1auDB.cjs +10 -0
- package/dist/packem_shared/generate-cache-key-YSju5pj2.mjs +8 -0
- package/dist/packem_shared/joinSegments-BH1CT4dK.cjs +48 -0
- package/dist/packem_shared/joinSegments-BHY8PPnk.mjs +46 -0
- package/dist/packem_shared/normalize-german-eszett-DJK0S2qj.cjs +11 -0
- package/dist/packem_shared/normalize-german-eszett-fpJ4lZL6.mjs +9 -0
- package/dist/packem_shared/types-BAd3WDHo.d.mts +59 -0
- package/dist/packem_shared/types-BNbQJg02.d.cts +41 -0
- package/dist/packem_shared/types-BNbQJg02.d.mts +41 -0
- package/dist/packem_shared/types-BNbQJg02.d.ts +41 -0
- package/dist/packem_shared/types-BttWSSIk.d.ts +59 -0
- package/dist/packem_shared/types-D2-6p7t1.d.cts +59 -0
- package/dist/slice.cjs +413 -0
- package/dist/slice.d.cts +10 -0
- package/dist/slice.d.mts +10 -0
- package/dist/slice.d.ts +10 -0
- package/dist/slice.mjs +409 -0
- package/dist/test/utils.cjs +77 -0
- package/dist/test/utils.d.cts +30 -0
- package/dist/test/utils.d.mts +30 -0
- package/dist/test/utils.d.ts +30 -0
- package/dist/test/utils.mjs +71 -0
- package/dist/test/vitest.cjs +11 -0
- package/dist/test/vitest.d.cts +8 -0
- package/dist/test/vitest.d.mts +8 -0
- package/dist/test/vitest.d.ts +8 -0
- package/dist/test/vitest.mjs +7 -0
- package/dist/truncate.cjs +90 -0
- package/dist/truncate.d.cts +12 -0
- package/dist/truncate.d.mts +12 -0
- package/dist/truncate.d.ts +12 -0
- package/dist/truncate.mjs +86 -0
- package/dist/utils.cjs +9 -0
- package/dist/utils.d.cts +14 -0
- package/dist/utils.d.mts +14 -0
- package/dist/utils.d.ts +14 -0
- package/dist/utils.mjs +1 -0
- package/package.json +468 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import LRUCache from '../packem_shared/LRUCache-udNErhWw.mjs';
|
|
2
|
+
import noCase from './no-case.mjs';
|
|
3
|
+
import upperFirst from './upper-first.mjs';
|
|
4
|
+
import { g as generateCacheKey } from '../packem_shared/generate-cache-key-YSju5pj2.mjs';
|
|
5
|
+
|
|
6
|
+
var __defProp = Object.defineProperty;
|
|
7
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
8
|
+
const defaultCacheStore = new LRUCache(1e3);
|
|
9
|
+
const pascalSnakeCase = /* @__PURE__ */ __name((value, options) => {
|
|
10
|
+
if (typeof value !== "string") {
|
|
11
|
+
return "";
|
|
12
|
+
}
|
|
13
|
+
const shouldCache = options?.cache ?? false;
|
|
14
|
+
const cacheStore = options?.cacheStore ?? defaultCacheStore;
|
|
15
|
+
let cacheKey;
|
|
16
|
+
if (shouldCache) {
|
|
17
|
+
cacheKey = generateCacheKey(value, options);
|
|
18
|
+
}
|
|
19
|
+
if (shouldCache && cacheKey && cacheStore.has(cacheKey)) {
|
|
20
|
+
return cacheStore.get(cacheKey);
|
|
21
|
+
}
|
|
22
|
+
const words = noCase(value, { ...options, cache: false }).split(" ");
|
|
23
|
+
const result = words.map((word) => upperFirst(word, { locale: options?.locale })).join("_");
|
|
24
|
+
if (shouldCache && cacheKey) {
|
|
25
|
+
cacheStore.set(cacheKey, result);
|
|
26
|
+
}
|
|
27
|
+
return result;
|
|
28
|
+
}, "pascalSnakeCase");
|
|
29
|
+
|
|
30
|
+
export { pascalSnakeCase as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const LRUCache = require('../packem_shared/LRUCache-Crb-m7cw.cjs');
|
|
4
|
+
const case_kebabCase = require('./kebab-case.cjs');
|
|
5
|
+
|
|
6
|
+
var __defProp = Object.defineProperty;
|
|
7
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
8
|
+
const defaultCacheStore = new LRUCache(1e3);
|
|
9
|
+
const pathCase = /* @__PURE__ */ __name((value, options) => case_kebabCase.kebabCase(value, { cacheStore: defaultCacheStore, ...options, joiner: "/" }), "pathCase");
|
|
10
|
+
|
|
11
|
+
module.exports = pathCase;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { b as CaseOptions, g as PathCase } from '../packem_shared/types-D2-6p7t1.cjs';
|
|
2
|
+
import '../packem_shared/types-BNbQJg02.cjs';
|
|
3
|
+
import '../utils.cjs';
|
|
4
|
+
|
|
5
|
+
declare const pathCase: <T extends string = string>(value?: T, options?: CaseOptions) => PathCase<T>;
|
|
6
|
+
|
|
7
|
+
export = pathCase;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { b as CaseOptions, g as PathCase } from '../packem_shared/types-BAd3WDHo.mjs';
|
|
2
|
+
import '../packem_shared/types-BNbQJg02.mjs';
|
|
3
|
+
import '../utils.mjs';
|
|
4
|
+
|
|
5
|
+
declare const pathCase: <T extends string = string>(value?: T, options?: CaseOptions) => PathCase<T>;
|
|
6
|
+
|
|
7
|
+
export { pathCase as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { b as CaseOptions, g as PathCase } from '../packem_shared/types-BttWSSIk.js';
|
|
2
|
+
import '../packem_shared/types-BNbQJg02.js';
|
|
3
|
+
import '../utils.js';
|
|
4
|
+
|
|
5
|
+
declare const pathCase: <T extends string = string>(value?: T, options?: CaseOptions) => PathCase<T>;
|
|
6
|
+
|
|
7
|
+
export = pathCase;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import LRUCache from '../packem_shared/LRUCache-udNErhWw.mjs';
|
|
2
|
+
import { kebabCase } from './kebab-case.mjs';
|
|
3
|
+
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
6
|
+
const defaultCacheStore = new LRUCache(1e3);
|
|
7
|
+
const pathCase = /* @__PURE__ */ __name((value, options) => kebabCase(value, { cacheStore: defaultCacheStore, ...options, joiner: "/" }), "pathCase");
|
|
8
|
+
|
|
9
|
+
export { pathCase as default };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const constants = require('../packem_shared/constants-HevSYUjU.cjs');
|
|
4
|
+
const LRUCache = require('../packem_shared/LRUCache-Crb-m7cw.cjs');
|
|
5
|
+
const case_splitByCase = require('./split-by-case.cjs');
|
|
6
|
+
const case_upperFirst = require('./upper-first.cjs');
|
|
7
|
+
const generateCacheKey = require('../packem_shared/generate-cache-key-D8f1auDB.cjs');
|
|
8
|
+
const joinSegments = require('../packem_shared/joinSegments-BH1CT4dK.cjs');
|
|
9
|
+
const normalizeGermanEszett = require('../packem_shared/normalize-german-eszett-DJK0S2qj.cjs');
|
|
10
|
+
|
|
11
|
+
var __defProp = Object.defineProperty;
|
|
12
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
13
|
+
const defaultCacheStore = new LRUCache(1e3);
|
|
14
|
+
const sentenceCase = /* @__PURE__ */ __name((value, options) => {
|
|
15
|
+
if (typeof value !== "string") {
|
|
16
|
+
return "";
|
|
17
|
+
}
|
|
18
|
+
const shouldCache = options?.cache ?? false;
|
|
19
|
+
const cacheStore = options?.cacheStore ?? defaultCacheStore;
|
|
20
|
+
let cacheKey;
|
|
21
|
+
if (shouldCache) {
|
|
22
|
+
cacheKey = generateCacheKey.generateCacheKey(value, options);
|
|
23
|
+
}
|
|
24
|
+
if (shouldCache && cacheKey && cacheStore.has(cacheKey)) {
|
|
25
|
+
return cacheStore.get(cacheKey);
|
|
26
|
+
}
|
|
27
|
+
let firstWord = true;
|
|
28
|
+
const result = joinSegments(
|
|
29
|
+
case_splitByCase.splitByCase(value, {
|
|
30
|
+
handleAnsi: options?.handleAnsi,
|
|
31
|
+
handleEmoji: options?.handleEmoji,
|
|
32
|
+
knownAcronyms: options?.knownAcronyms,
|
|
33
|
+
locale: options?.locale,
|
|
34
|
+
normalize: options?.normalize,
|
|
35
|
+
separators: void 0,
|
|
36
|
+
stripAnsi: options?.stripAnsi,
|
|
37
|
+
stripEmoji: options?.stripEmoji
|
|
38
|
+
}).map((word) => {
|
|
39
|
+
if (options?.handleAnsi && constants.RE_FAST_ANSI.test(word)) {
|
|
40
|
+
return word;
|
|
41
|
+
}
|
|
42
|
+
word = options?.locale?.startsWith("de") ? normalizeGermanEszett.normalizeGermanEszett(word) : word;
|
|
43
|
+
word = options?.locale ? word.toLocaleLowerCase(options.locale) : word.toLowerCase();
|
|
44
|
+
if (firstWord) {
|
|
45
|
+
firstWord = false;
|
|
46
|
+
return case_upperFirst(word, options);
|
|
47
|
+
}
|
|
48
|
+
return word;
|
|
49
|
+
}),
|
|
50
|
+
" "
|
|
51
|
+
);
|
|
52
|
+
if (shouldCache && cacheKey) {
|
|
53
|
+
cacheStore.set(cacheKey, result);
|
|
54
|
+
}
|
|
55
|
+
return result;
|
|
56
|
+
}, "sentenceCase");
|
|
57
|
+
|
|
58
|
+
module.exports = sentenceCase;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { b as CaseOptions, S as SentenceCase } from '../packem_shared/types-D2-6p7t1.cjs';
|
|
2
|
+
import '../packem_shared/types-BNbQJg02.cjs';
|
|
3
|
+
import '../utils.cjs';
|
|
4
|
+
|
|
5
|
+
declare const sentenceCase: <T extends string = string>(value?: T, options?: CaseOptions) => SentenceCase<T>;
|
|
6
|
+
|
|
7
|
+
export = sentenceCase;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { b as CaseOptions, S as SentenceCase } from '../packem_shared/types-BAd3WDHo.mjs';
|
|
2
|
+
import '../packem_shared/types-BNbQJg02.mjs';
|
|
3
|
+
import '../utils.mjs';
|
|
4
|
+
|
|
5
|
+
declare const sentenceCase: <T extends string = string>(value?: T, options?: CaseOptions) => SentenceCase<T>;
|
|
6
|
+
|
|
7
|
+
export { sentenceCase as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { b as CaseOptions, S as SentenceCase } from '../packem_shared/types-BttWSSIk.js';
|
|
2
|
+
import '../packem_shared/types-BNbQJg02.js';
|
|
3
|
+
import '../utils.js';
|
|
4
|
+
|
|
5
|
+
declare const sentenceCase: <T extends string = string>(value?: T, options?: CaseOptions) => SentenceCase<T>;
|
|
6
|
+
|
|
7
|
+
export = sentenceCase;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { R as RE_FAST_ANSI } from '../packem_shared/constants-BnVGLrDr.mjs';
|
|
2
|
+
import LRUCache from '../packem_shared/LRUCache-udNErhWw.mjs';
|
|
3
|
+
import { splitByCase } from './split-by-case.mjs';
|
|
4
|
+
import upperFirst from './upper-first.mjs';
|
|
5
|
+
import { g as generateCacheKey } from '../packem_shared/generate-cache-key-YSju5pj2.mjs';
|
|
6
|
+
import joinSegments from '../packem_shared/joinSegments-BHY8PPnk.mjs';
|
|
7
|
+
import { n as normalizeGermanEszett } from '../packem_shared/normalize-german-eszett-fpJ4lZL6.mjs';
|
|
8
|
+
|
|
9
|
+
var __defProp = Object.defineProperty;
|
|
10
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
11
|
+
const defaultCacheStore = new LRUCache(1e3);
|
|
12
|
+
const sentenceCase = /* @__PURE__ */ __name((value, options) => {
|
|
13
|
+
if (typeof value !== "string") {
|
|
14
|
+
return "";
|
|
15
|
+
}
|
|
16
|
+
const shouldCache = options?.cache ?? false;
|
|
17
|
+
const cacheStore = options?.cacheStore ?? defaultCacheStore;
|
|
18
|
+
let cacheKey;
|
|
19
|
+
if (shouldCache) {
|
|
20
|
+
cacheKey = generateCacheKey(value, options);
|
|
21
|
+
}
|
|
22
|
+
if (shouldCache && cacheKey && cacheStore.has(cacheKey)) {
|
|
23
|
+
return cacheStore.get(cacheKey);
|
|
24
|
+
}
|
|
25
|
+
let firstWord = true;
|
|
26
|
+
const result = joinSegments(
|
|
27
|
+
splitByCase(value, {
|
|
28
|
+
handleAnsi: options?.handleAnsi,
|
|
29
|
+
handleEmoji: options?.handleEmoji,
|
|
30
|
+
knownAcronyms: options?.knownAcronyms,
|
|
31
|
+
locale: options?.locale,
|
|
32
|
+
normalize: options?.normalize,
|
|
33
|
+
separators: void 0,
|
|
34
|
+
stripAnsi: options?.stripAnsi,
|
|
35
|
+
stripEmoji: options?.stripEmoji
|
|
36
|
+
}).map((word) => {
|
|
37
|
+
if (options?.handleAnsi && RE_FAST_ANSI.test(word)) {
|
|
38
|
+
return word;
|
|
39
|
+
}
|
|
40
|
+
word = options?.locale?.startsWith("de") ? normalizeGermanEszett(word) : word;
|
|
41
|
+
word = options?.locale ? word.toLocaleLowerCase(options.locale) : word.toLowerCase();
|
|
42
|
+
if (firstWord) {
|
|
43
|
+
firstWord = false;
|
|
44
|
+
return upperFirst(word, options);
|
|
45
|
+
}
|
|
46
|
+
return word;
|
|
47
|
+
}),
|
|
48
|
+
" "
|
|
49
|
+
);
|
|
50
|
+
if (shouldCache && cacheKey) {
|
|
51
|
+
cacheStore.set(cacheKey, result);
|
|
52
|
+
}
|
|
53
|
+
return result;
|
|
54
|
+
}, "sentenceCase");
|
|
55
|
+
|
|
56
|
+
export { sentenceCase as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const LRUCache = require('../packem_shared/LRUCache-Crb-m7cw.cjs');
|
|
4
|
+
const case_kebabCase = require('./kebab-case.cjs');
|
|
5
|
+
|
|
6
|
+
var __defProp = Object.defineProperty;
|
|
7
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
8
|
+
const defaultCacheStore = new LRUCache(1e3);
|
|
9
|
+
const snakeCase = /* @__PURE__ */ __name((value, options) => case_kebabCase.kebabCase(value, { cacheStore: defaultCacheStore, ...options, joiner: "_" }), "snakeCase");
|
|
10
|
+
|
|
11
|
+
module.exports = snakeCase;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { b as CaseOptions, h as SnakeCase } from '../packem_shared/types-D2-6p7t1.cjs';
|
|
2
|
+
import '../packem_shared/types-BNbQJg02.cjs';
|
|
3
|
+
import '../utils.cjs';
|
|
4
|
+
|
|
5
|
+
declare const snakeCase: <T extends string = string>(value?: T, options?: CaseOptions) => SnakeCase<T>;
|
|
6
|
+
|
|
7
|
+
export = snakeCase;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { b as CaseOptions, h as SnakeCase } from '../packem_shared/types-BAd3WDHo.mjs';
|
|
2
|
+
import '../packem_shared/types-BNbQJg02.mjs';
|
|
3
|
+
import '../utils.mjs';
|
|
4
|
+
|
|
5
|
+
declare const snakeCase: <T extends string = string>(value?: T, options?: CaseOptions) => SnakeCase<T>;
|
|
6
|
+
|
|
7
|
+
export { snakeCase as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { b as CaseOptions, h as SnakeCase } from '../packem_shared/types-BttWSSIk.js';
|
|
2
|
+
import '../packem_shared/types-BNbQJg02.js';
|
|
3
|
+
import '../utils.js';
|
|
4
|
+
|
|
5
|
+
declare const snakeCase: <T extends string = string>(value?: T, options?: CaseOptions) => SnakeCase<T>;
|
|
6
|
+
|
|
7
|
+
export = snakeCase;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import LRUCache from '../packem_shared/LRUCache-udNErhWw.mjs';
|
|
2
|
+
import { kebabCase } from './kebab-case.mjs';
|
|
3
|
+
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
6
|
+
const defaultCacheStore = new LRUCache(1e3);
|
|
7
|
+
const snakeCase = /* @__PURE__ */ __name((value, options) => kebabCase(value, { cacheStore: defaultCacheStore, ...options, joiner: "_" }), "snakeCase");
|
|
8
|
+
|
|
9
|
+
export { snakeCase as default };
|