@polygonjs/polygonjs
Version:
node-based WebGL 3D engine https://polygonjs.com
39 lines (38 loc) • 2.12 kB
TypeScript
export declare function stringIsBoolean(word: string): boolean;
export declare function stringToBoolean(word: string): boolean;
export declare function stringIsNumber(word: string): boolean;
export declare function sanitizeName(word: string): string;
export declare function stringToAttribNames(word: string, target: string[]): string[];
export declare function stringTailDigits(word: string): number;
export declare function stringIncrement(word: string): string;
export declare function stringPluralize(word: string): string;
export declare function stringCamelCase(str: string): string;
export declare function stringUpperFirst(word: string): string;
export declare function stringTitleize(word: string): string;
export declare function precision(val: number, decimals?: number): string;
export declare function ensureFloat(num: number): string;
export declare function ensureInteger(num: number): string;
export declare function stringMatchMask(word: string, mask: string): boolean;
export declare function stringMatchesOneMask(word: string, masks: string[]): boolean;
export declare function stringToIndices(indicesString: string, target: number[]): number[];
export declare function stringEscapeLineBreaks(word: string): string;
export declare class CoreString {
static isBoolean: typeof stringIsBoolean;
static toBoolean: typeof stringToBoolean;
static isNumber: typeof stringIsNumber;
static tailDigits: typeof stringTailDigits;
static increment: typeof stringIncrement;
static pluralize: typeof stringPluralize;
static camelCase: typeof stringCamelCase;
static upperFirst: typeof stringUpperFirst;
static titleize: typeof stringTitleize;
static precision: typeof precision;
static ensureFloat: typeof ensureFloat;
static ensureInteger: typeof ensureInteger;
static matchMask: typeof stringMatchMask;
static matchesOneMask: typeof stringMatchesOneMask;
static attribNames: typeof stringToAttribNames;
static indices: typeof stringToIndices;
static escapeLineBreaks: typeof stringEscapeLineBreaks;
static sanitizeName: typeof sanitizeName;
}