Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
new external script to adds quotes to comma-separated lists
  • Loading branch information
mishamsk authored Apr 18, 2021
1 parent 91ecee4 commit 7e03514
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Scripts/addQuotesToCommaSeparatedList.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
{
"id": "co.perlovs.Esse.ExternalFunctions.addQuotesToCommaSeparatedList",
"name":"Add quotes to a comma separated list",
"description":"Takes in a comma-separated list and adds single quotes around each item",
"category":"Convert",
"author":"Perlovs",
}
**/

function main(input) {
return "'" + input.split(',').map(s => s.trim()).join("','") + "'";
}

0 comments on commit 7e03514

Please sign in to comment.