UNPKG

@thisisagile/easy

Version:

Straightforward library for building domain-driven microservice architectures

47 lines (46 loc) 1.65 kB
import { Text } from './Text'; import { Optional } from './Types'; import { Get } from './Get'; import { List } from './List'; import { JsonValue } from './Json'; export declare class ToText implements Text { readonly subject: string; constructor(subject: string); get cap(): ToText; get capFirst(): ToText; get title(): ToText; get pascal(): ToText; get lower(): ToText; get upper(): ToText; get camel(): ToText; get kebab(): ToText; get strictKebab(): ToText; get slug(): ToText; get snake(): ToText; get plural(): ToText; get space(): ToText; get sentence(): ToText; get initials(): ToText; get trim(): ToText; get trimSentence(): ToText; get isEmpty(): boolean; parse: (subject: unknown, options?: {}) => ToText; is: (...others: unknown[]) => boolean; equals: (...others: unknown[]) => boolean; like: (...others: unknown[]) => boolean; isLike: (...others: unknown[]) => boolean; ifLike: (...others: unknown[]) => Optional<this>; endsWith: (end?: unknown) => boolean; startsWith: (end?: unknown) => boolean; first: (n: number) => ToText; last: (n: number) => ToText; map: (func: Get<string, string>) => ToText; replace: (search: Text, replace: Text) => ToText; add: (add?: unknown, separator?: string) => ToText; with: (separator: string, ...other: unknown[]) => ToText; split: (separator?: string) => List<string>; toString(): string; toJSON(): JsonValue; } export declare function text(subject?: unknown, alt?: string): ToText; export declare function textValue(subject: any, prop: string): string;