misc-utils-of-mine-generic
Version:
Miscellaneous utilities for JavaScript/TypeScript that I often use
6 lines (5 loc) • 306 B
TypeScript
export declare function evaluate<T = any>(s: string, defaultValue?: undefined): T | undefined;
/**
* Transform a string like `foo: 2, bar: hello world` to an object like `{foo: '2', bar: 'hello world'}`
*/
export declare function stringToObject(s?: string, propSep?: string, nameValueSep?: string): any;