Skip to content

Instantly share code, notes, and snippets.

@xenophy
Created January 19, 2016 11:01
Show Gist options
  • Save xenophy/a425cacc0ff4ceb7d2c2 to your computer and use it in GitHub Desktop.
Save xenophy/a425cacc0ff4ceb7d2c2 to your computer and use it in GitHub Desktop.
_und.each(this.collection, function (postmanRequest) {
var found = postmanRequest.name.match(/(\[loop=\d+\])/i);
if (found) {
found = found[0].substr(6, found[0].length - 7);
found = Number(found);
for(var i=0; i<found; i++) {
RequestRunner.addRequest(postmanRequest);
}
} else {
RequestRunner.addRequest(postmanRequest);
}
}, this);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment