@levrbet/shared 0.1.42 → 0.1.43

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.
@@ -1 +1,8 @@
1
+ import ms from "ms";
1
2
  export declare const argHash: (...args: (string | number | bigint)[]) => string;
3
+ /**
4
+ * Sleep for a specified duration.
5
+ * @param value - A string value representing the duration to sleep (e.g., "2s", "500ms", "1m").
6
+ * @returns A promise that resolves after the specified duration.
7
+ */
8
+ export declare const sleep: (value: ms.StringValue) => Promise<void>;
@@ -1,6 +1,17 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.argHash = void 0;
6
+ exports.sleep = exports.argHash = void 0;
7
+ const ms_1 = __importDefault(require("ms"));
4
8
  const argHash = (...args) => args.join("-");
5
9
  exports.argHash = argHash;
10
+ /**
11
+ * Sleep for a specified duration.
12
+ * @param value - A string value representing the duration to sleep (e.g., "2s", "500ms", "1m").
13
+ * @returns A promise that resolves after the specified duration.
14
+ */
15
+ const sleep = (value) => new Promise((resolve) => setTimeout(resolve, (0, ms_1.default)(value)));
16
+ exports.sleep = sleep;
6
17
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/core/utils.ts"],"names":[],"mappings":";;;AAAO,MAAM,OAAO,GAAG,CAAC,GAAG,IAAkC,EAAU,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AAA3E,QAAA,OAAO,WAAoE"}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/core/utils.ts"],"names":[],"mappings":";;;;;;AAAA,4CAAmB;AAEZ,MAAM,OAAO,GAAG,CAAC,GAAG,IAAkC,EAAU,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AAA3E,QAAA,OAAO,WAAoE;AAExF;;;;GAIG;AACI,MAAM,KAAK,GAAG,CAAC,KAAqB,EAAiB,EAAE,CAAC,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,IAAA,YAAE,EAAC,KAAK,CAAC,CAAC,CAAC,CAAA;AAA1G,QAAA,KAAK,SAAqG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@levrbet/shared",
3
- "version": "0.1.42",
3
+ "version": "0.1.43",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "exports": {