MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / getStr

Function getStr

utils/lang.js:381–392  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

379}
380
381function getStr(str) {
382 return new Promise((resolve, reject) => {
383 if (val) {
384 resolve(val);
385 return;
386 }
387
388 read.question(str, (res) => {
389 resolve(res);
390 });
391 });
392}
393
394function escapeRegExp(text) {
395 return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");

Callers 2

updateFunction · 0.85
askTranslationFunction · 0.85

Calls 1

resolveFunction · 0.85

Tested by

no test coverage detected