diginext-utils
Version:
README.md
66 lines (65 loc) • 2.46 kB
TypeScript
/**
* Get string between str1 and str2 from text
*/
export declare const getBetween: (text: string, str1: string, str2?: string) => string;
/**
* Convert object to string
*/
export declare const makeString: (object?: any) => string;
/**
* toUpperCase
*/
export declare const toUpperCase: (str?: string) => string;
/**
* toLowerCase
*/
export declare const toLowerCase: (str?: string) => string;
/**
* toLowerCase
* @param {*} str
* @return {string}
*/
export declare const titleize: (str?: string) => string;
/**
* Convert only first charater to UpperCase
*/
export declare const capitalize: (str: string | any, lowercaseRest?: number) => any;
/**
* Convert first character from every single words to UpperCase
*/
export declare const capitalizeName: (str: string) => string;
export declare const clearUnicodeCharacters: (s: string, opt?: {
[key: string]: any;
}) => string;
import { makeDaySlug } from "./makeDaySlug";
import { generateUUID } from "./generateUUID";
import { formatNumber } from "./formatNumber";
import { generatePassword } from "./generatePassword";
import { trimNull } from "./trimNull";
declare const xstring: {
getBetween: (text: string, str1: string, str2?: string) => string;
makeString: (object?: any) => string;
makeDaySlug: typeof makeDaySlug;
toUpperCase: (str?: string) => string;
toLowerCase: (str?: string) => string;
titleize: (str?: string) => string;
capitalize: (str: string | any, lowercaseRest?: number) => any;
capitalizeName: (str: string) => string;
clearUnicodeCharacters: (s: string, opt?: {
[key: string]: any;
}) => string;
generateUUID: typeof generateUUID;
randAllCharacterByLength: (length?: number) => string;
randomStringByLength: (length: number, str?: string) => string;
formatNumber: typeof formatNumber;
generatePassword: typeof generatePassword;
trimNull: typeof trimNull;
addQueryParam: (_url: string, key: string, value: any) => string;
getUrlParams: (parameter: string, staticURL?: string | undefined, decode?: boolean) => string | false | undefined;
isLink: (str: string) => boolean;
getFileNameWithoutExtension: (url: string) => string;
getFileNameWithExtension: (url: string) => string;
getFileExtension: (url: string) => string | null | undefined;
isImage: (url: string) => boolean;
};
export default xstring;