You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Query strings are one of the most popular methods for passing data, providing input data along with a URL. It mainly consists of data in key and value format. I thought about automatically creating this into a type such as ExtractRouteParams in #14.
However, since query strings can handle a large number of cases, here it will proceed with a method of processing a total of 8 patterns.
Handle simple key-value pairs.
Processes arrays represented by repeated keys.
Processes arrays expressed as comma-separated values.
Handle object and array expressions using bracket notation.
Handle JSON strings.
Boolean value
Numeric value
Date and Time Format (ISO 8601)
It can parse looks like below.
typeQuery="user[name]=John&user[age]=30&tags[]=red,tags[]=blue&startDate=2024-08-19T15:00:00Z&enabled=true&complexData={\"key\":\"value\"}";typeQueryParams=ExtractRouteQueries<Query>;// Result will be:typeQueryParams={user: {name: string;age: number;};tags: string[];startDate: Date;enabled: boolean;complexData: {key: string};}
The text was updated successfully, but these errors were encountered:
It supports for
ExtractRouteQueries
.Query strings are one of the most popular methods for passing data, providing input data along with a URL. It mainly consists of data in key and value format. I thought about automatically creating this into a type such as
ExtractRouteParams
in #14.However, since query strings can handle a large number of cases, here it will proceed with a method of processing a total of 8 patterns.
It can parse looks like below.
The text was updated successfully, but these errors were encountered: