@stacksjs/strings 0.65.0 → 0.68.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/dist/case.d.ts CHANGED
@@ -1,12 +1,36 @@
1
- /**
2
- * First letter uppercase, other lowercase
3
- * @category string
4
- * @example
5
- * ```
6
- * capitalize('hello world') => 'Hello world'
7
- * ```
8
- */
9
1
  export declare function capitalize(str: string): string;
10
2
  export declare function lowercase(str: string): string;
11
- export { camelCase, capitalCase, constantCase, dotCase, kebabCase, kebabCase as paramCase, noCase, pascalCase, pathCase, sentenceCase, snakeCase, split } from "change-case";
12
- export { titleCase } from "title-case";
3
+ declare const DEFAULT_PREFIX_SUFFIX_CHARACTERS: unknown;
4
+ export declare type Locale = string[] | string | false | undefined
5
+ export declare interface PascalCaseOptions extends CaseOptions {
6
+ mergeAmbiguousCharacters?: boolean
7
+ }
8
+ export declare interface CaseOptions {
9
+ locale?: Locale
10
+ split?: (value: string) => string[]
11
+ delimiter?: string
12
+ prefixCharacters?: string
13
+ suffixCharacters?: string
14
+ }
15
+ export declare function split(value: string): string[];
16
+ export declare function splitSeparateNumbers(value: string): string[];
17
+ export declare function noCase(input: string, options?: CaseOptions): string;
18
+ export declare function camelCase(input: string, options?: PascalCaseOptions): string;
19
+ export declare function pascalCase(input: string, options?: PascalCaseOptions): string;
20
+ export declare function pascalSnakeCase(input: string, options?: CaseOptions): string;
21
+ export declare function capitalCase(input: string, options?: CaseOptions): string;
22
+ export declare function constantCase(input: string, options?: CaseOptions): string;
23
+ export declare function dotCase(input: string, options?: CaseOptions): string;
24
+ export declare function kebabCase(input: string, options?: CaseOptions): string;
25
+ export declare function pathCase(input: string, options?: CaseOptions): string;
26
+ export declare function sentenceCase(input: string, options?: CaseOptions): string;
27
+ export declare function snakeCase(input: string, options?: CaseOptions): string;
28
+ export declare function trainCase(input: string, options?: CaseOptions): string;
29
+ declare function lowerFactory(locale: Locale): (input: string) => string { return locale === false ? (input: string) => input.toLowerCase() : (input: string) => input.toLocaleLowerCase(locale) };
30
+ declare function upperFactory(locale: Locale): (input: string) => string { return locale === false ? (input: string) => input.toUpperCase() : (input: string) => input.toLocaleUpperCase(locale) };
31
+ declare function capitalCaseTransformFactory(lower: (input: string) => string, upper: (input: string) => string,): void;
32
+ declare function pascalCaseTransformFactory(lower: (input: string) => string, upper: (input: string) => string,): void;
33
+ declare function splitPrefixSuffix(input: string, options: CaseOptions = {},): [string, string[], string];
34
+ export * from './sponge-case'
35
+ export * from './swap-case'
36
+ export * from './title-case'
@@ -0,0 +1,9 @@
1
+ declare const INDENT_TYPE_SPACE: 'space' const INDENT_TYPE_TAB = 'tab';
2
+ declare function makeIndentsMap(string: string, ignoreSingleSpaces: boolean = true): void;
3
+ declare function encodeIndentsKey(indentType: any, indentAmount: any): void;
4
+ declare function decodeIndentsKey(indentsKey: any): void;
5
+ declare function getMostUsedKey(indents: any): void;
6
+ declare function makeIndentString(type: any, amount: any): void;
7
+ export declare function detectIndent(string: string);
8
+
9
+ export default detectIndent;
@@ -0,0 +1,2 @@
1
+ export declare function detectNewline(string: string): string | undefined;
2
+ export declare function detectNewlineGraceful(string: string): string;
package/dist/helpers.d.ts CHANGED
@@ -1 +1 @@
1
- export declare function toString(v: any): string;
1
+ export declare function toString(v: any): string;
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export * from "./string";
2
- export * as string from "./string";
1
+ export * from './string'
2
+ export * as string from './string'