The type(s) of values to match in the list
Optional
options: { Options for the list
Optional
global?: booleanWhether to match globally
Optional
separator?: stringThe separator between values in the list
A RegExp matching a list of values
Matching a list of integers
const m1 = List(Integer());
const t1 = "{{list:1,2,3}}";
expect(t1.match(m1)).toEqual(["1", "2", "3"]);
Matching a mixed list
const m1 = List([Bool(), Integer(), HTTPURL()]);
const t1 = "{{list:1,https://www.google.com,true}}";
expect(t1.match(m1)).toEqual(["1", "https://www.google.com", "true"]);
Generated using TypeDoc
Matches a list of values of a specific type