@jrc03c/pause 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +17 -0
- package/moon.yml +19 -0
- package/package.json +13 -0
package/index.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
function pause(ms) {
|
|
2
|
+
return new Promise((resolve, reject) => {
|
|
3
|
+
try {
|
|
4
|
+
return setTimeout(() => resolve(), ms)
|
|
5
|
+
} catch (e) {
|
|
6
|
+
return reject(e)
|
|
7
|
+
}
|
|
8
|
+
})
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
if (typeof module !== "undefined") {
|
|
12
|
+
module.exports = pause
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
if (typeof window !== "undefined") {
|
|
16
|
+
window.pause = pause
|
|
17
|
+
}
|
package/moon.yml
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
language: javascript
|
|
2
|
+
tasks:
|
|
3
|
+
pub:
|
|
4
|
+
command:
|
|
5
|
+
- npm
|
|
6
|
+
- publish
|
|
7
|
+
- --access=public
|
|
8
|
+
deps:
|
|
9
|
+
- ~:pub-dep1
|
|
10
|
+
local: true
|
|
11
|
+
platform: node
|
|
12
|
+
pub-dep1:
|
|
13
|
+
command:
|
|
14
|
+
- npm
|
|
15
|
+
- version
|
|
16
|
+
- patch
|
|
17
|
+
- --force
|
|
18
|
+
local: true
|
|
19
|
+
platform: node
|