@takeshape/util 8.234.2 → 8.235.1

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/dist/common.d.ts CHANGED
@@ -20,4 +20,5 @@ export * from './timezone';
20
20
  export * from './async-noop';
21
21
  export * from './set-in';
22
22
  export * from './sets';
23
+ export * from './sleep';
23
24
  //# sourceMappingURL=common.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/common.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC"}
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/common.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
package/dist/common.js CHANGED
@@ -288,4 +288,17 @@ Object.keys(_sets).forEach(function (key) {
288
288
  return _sets[key];
289
289
  }
290
290
  });
291
+ });
292
+
293
+ var _sleep = require("./sleep");
294
+
295
+ Object.keys(_sleep).forEach(function (key) {
296
+ if (key === "default" || key === "__esModule") return;
297
+ if (key in exports && exports[key] === _sleep[key]) return;
298
+ Object.defineProperty(exports, key, {
299
+ enumerable: true,
300
+ get: function () {
301
+ return _sleep[key];
302
+ }
303
+ });
291
304
  });
@@ -0,0 +1,2 @@
1
+ export declare function sleep(ms: number): Promise<unknown>;
2
+ //# sourceMappingURL=sleep.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sleep.d.ts","sourceRoot":"","sources":["../../src/sleep.ts"],"names":[],"mappings":"AAAA,wBAAsB,KAAK,CAAC,EAAE,EAAE,MAAM,oBAIrC"}
package/dist/sleep.js ADDED
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.sleep = sleep;
7
+
8
+ async function sleep(ms) {
9
+ return new Promise(resolve => {
10
+ setTimeout(resolve, ms);
11
+ });
12
+ }
package/es/common.js CHANGED
@@ -19,4 +19,5 @@ export * from './billing';
19
19
  export * from './timezone';
20
20
  export * from './async-noop';
21
21
  export * from './set-in';
22
- export * from './sets';
22
+ export * from './sets';
23
+ export * from './sleep';
package/es/sleep.js ADDED
@@ -0,0 +1,5 @@
1
+ export async function sleep(ms) {
2
+ return new Promise(resolve => {
3
+ setTimeout(resolve, ms);
4
+ });
5
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@takeshape/util",
3
- "version": "8.234.2",
3
+ "version": "8.235.1",
4
4
  "description": "Shared utilities",
5
5
  "homepage": "https://www.takeshape.io",
6
6
  "repository": {
@@ -21,7 +21,7 @@
21
21
  "es"
22
22
  ],
23
23
  "dependencies": {
24
- "@takeshape/routing": "8.234.2",
24
+ "@takeshape/routing": "8.235.1",
25
25
  "@types/url-parse": "^1.4.4",
26
26
  "classnames": "^2.2.5",
27
27
  "dom-serializer": "0.2.2",