const delay = (ms) => new Promise(resolve => setTimeout(resolve, ms));
const stringContainsJson = (str) => {
  let parsedJson;
  try {
    // attempt to parse JSON object from provided string
    parsedJson = JSON.parse(str);
  }
  catch (err) {
    // not a valid JSON string
    return false;
  }
  return typeof parsedJson === "object" && parsedJson !== null;
};

export { delay as d, stringContainsJson as s };
