There's no handling of multiple declarations of a param on the same property
Suggestion
const p1 = new SpdrSearch('lastname', ['Belmondo']);
const p2 = new SpdrSearch('lastname', ['Delon']);
const qb = new SpdrQueryBuilder([p1,p2]);
Several solutions to this:
This could throw an exception
Or glue SpdrParam instances into a single SpdrParam with multiple values when possible. Here it could transform p1 and p2 into const p3 = new SpdrSearch('lastname', ['Belmondo', 'Delon']) , for example.
Keep only the last instance, that may be the best solution as it would be super handy to use.
All solutions, depending on an optional parameter, with the exception by default.
Version
2.x
Issue
There's no handling of multiple declarations of a param on the same property
Suggestion
Several solutions to this:
p1
andp2
intoconst p3 = new SpdrSearch('lastname', ['Belmondo', 'Delon'])
, for example.