UNPKG

power-tasks

Version:

Powerful task management for JavaScript

9 lines (8 loc) 291 B
export function plural(word, isPlural, pluralWord) { if ((typeof isPlural === "number" && isPlural > 1) || isPlural) return pluralWord ? pluralWord : word + "s"; return word; } export function delay(t) { return new Promise((resolve) => setTimeout(resolve, t).unref()); }