Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2017
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. const attributes: Attribute[] = [];
  2.  
  3. for (const param in params) {
  4. if (/^attributes/.test(param)) {
  5. const title = /^attributes\[+(.*)+\]$/.exec(param).splice(1).shift();
  6. const selected = params[param];
  7.  
  8. const attribute: Attribute = new Attribute({ title, selected });
  9.  
  10. attributes.push(attribute);
  11. }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement