UNPKG

string-converters

Version:

A utility library for converting data types and working with arrays. Provides converters for boolean, number, and string values, along with array conversion functions and support for values with predefined options.

17 lines (16 loc) 451 B
export type Converter<T> = { /** * Serializes the specified value into a string. * * @param value - The value to be serialized. * @returns The serialized value as a string. */ stringify(value: T): string; /** * Parses the specified string and returns the deserialized value. * * @param value - The string to be parsed. * @returns The deserialized value. */ parse(value: string): T; };