MCPcopy Index your code
hub / github.com/Macuyiko/minecraft-python / supplant

Function supplant

ServerEditorWeb/ace/worker-javascript.js:2428–2433  ·  view source on GitHub ↗
(str, data)

Source from the content-addressed store, hash-verified

2426 }
2427
2428 function supplant(str, data) {
2429 return str.replace(/\{([^{}]*)\}/g, function (a, b) {
2430 var r = data[b];
2431 return typeof r === "string" || typeof r === "number" ? r : a;
2432 });
2433 }
2434
2435 function combine(dest, src) {
2436 Object.keys(src).forEach(function (name) {

Callers 1

warningFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected