MCPcopy
hub / github.com/pythongosssss/ComfyUI-Custom-Scripts / format

Function format

web/js/assets/canvas2svg.js:20–26  ·  view source on GitHub ↗
(str, args)

Source from the content-addressed store, hash-verified

18
19 //helper function to format a string
20 function format(str, args) {
21 var keys = Object.keys(args), i;
22 for (i=0; i<keys.length; i++) {
23 str = str.replace(new RegExp("\\{" + keys[i] + "\\}", "gi"), args[keys[i]]);
24 }
25 return str;
26 }
27
28 //helper function that generates a random string
29 function randomString(holder) {

Callers 1

canvas2svg.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected