(str)
| 379 | } |
| 380 | |
| 381 | function 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 | |
| 394 | function escapeRegExp(text) { |
| 395 | return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); |
no test coverage detected