Skip to content

Instantly share code, notes, and snippets.

@abhijitkane
Created August 2, 2016 18:49
Show Gist options
  • Save abhijitkane/5d383fb95a35ea6bd2cb52c7ba379472 to your computer and use it in GitHub Desktop.
Save abhijitkane/5d383fb95a35ea6bd2cb52c7ba379472 to your computer and use it in GitHub Desktop.
Create a guid in postman script
function S4() {
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
}
function guid() {
return (S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4());
}
var newGuid = guid();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment