UNPKG
power-tasks
Version:
latest (1.11.0)
1.11.0
1.10.1
1.10.0
1.9.0
1.8.0
1.7.7
1.7.6
1.7.5
1.7.4
1.7.3
1.7.2
1.7.1
1.7.0
1.6.4
1.6.3
1.6.2
1.6.1
1.6.0
1.5.1
1.5.0
1.4.0
1.3.0
1.2.0
1.1.0
1.0.1
1.0.0
0.8.0
0.7.0
0.6.0
0.5.0
0.4.0
0.3.0
0.2.0
0.1.0
0.0.2
0.0.1
Powerful task management for JavaScript
github.com/panates/power-tasks
panates/power-tasks
power-tasks
/
esm
/
utils.js
9 lines
(8 loc)
•
291 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
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
()); }