UNPKG

@pushrocks/smartstring

Version:

handle strings in smart ways. TypeScript ready.

44 lines (43 loc) 1.02 kB
/** * the type for base 64 */ export type TStringInputType = 'string' | 'base64' | 'base64uri'; /** * handle base64 strings */ export declare class Base64 { private refString; constructor(inputStringArg: any, typeArg: TStringInputType); /** * the simple string (unencoded) */ get simpleString(): string; /** * the base64 encoded version of the original string */ get base64String(): string; /** * the base64uri encoded version of the original string */ get base64UriString(): string; } export declare let base64: { /** * encodes the string */ encode: (stringArg: string) => string; /** * encodes a stringArg to base64 uri style */ encodeUri: (stringArg: string) => string; /** * decodes a base64 encoded string */ decode: (stringArg: string) => string; /** * * @param stringArg * checks wether the string is base64 encoded */ isBase64: (stringArg: string) => boolean; };