INNER CODE UNIT · JavaScript

commandCheck

albertincx/formatbot1 · src/api/utils/index.js:16

function commandCheck(txt) {
  const found = txt.match(CHECK_REGEX);

  return found && found[1];
}

function fetchTimeout(u, connectTimeout = 10000) {
  return fetch(u, {
    dispatcher: new Agent({connectTimeout})
  });
}

function timeout(s, f) {
  const tm = r =>
    setTimeout(() => {
      if (f) {
        f();
      }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…