UNPKG

power-tasks

Version:

Powerful task management for JavaScript

13 lines (12 loc) 402 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.plural = plural; exports.delay = delay; function plural(word, isPlural, pluralWord) { if ((typeof isPlural === "number" && isPlural > 1) || isPlural) return pluralWord ? pluralWord : word + "s"; return word; } function delay(t) { return new Promise((resolve) => setTimeout(resolve, t).unref()); }