parsley

Is your domain logic littered with parsing?

Parsley is a simple but powerful parsing engine that uses inferences to automatically find the correct parser for the required input / output.

Getting Started

Simply import the package into your project and forget about parsing forever!

You can also register your own custom parsers using parsley.registerParser(<your_function>) function.

Example

int five = parse("5"); // 5

bool textToBool = parse("true") // true

int stringToInt = parse("5"); // 5

String intToString = parse(5); // "5"

bool intToBool = parse(1); // true

List intToStringList = parse(1, 8, 3); // '1', '8', '3'

Libraries

parse_bool_to_double
parse_bool_to_int
parse_bool_to_string
parse_datetime_to_string
parse_double_to_bool
parse_double_to_int
parse_double_to_string
parse_int_list_to_string_list
parse_int_to_bool
parse_int_to_double
parse_int_to_list
parse_int_to_string
parse_string_list_to_int_list
parse_string_to_bool
parse_string_to_double
parse_string_to_int
parsely
string_to_date