Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const attributes: Attribute[] = [];
- for (const param in params) {
- if (/^attributes/.test(param)) {
- const title = /^attributes\[+(.*)+\]$/.exec(param).splice(1).shift();
- const selected = params[param];
- const attribute: Attribute = new Attribute({ title, selected });
- attributes.push(attribute);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement