jaypie 1.0.18 → 1.0.19

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.
Files changed (2) hide show
  1. package/README.md +21 -4
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -89,9 +89,7 @@ export const handler = lambdaHandler(async({event}) => {
89
89
  }, { name: "example"});
90
90
  ```
91
91
 
92
- This example would then be deployed to AWS via CDK or similar orchestration.
93
-
94
- _A `@jaypie/cdk` package is intended_
92
+ This example would then be deployed to AWS via CDK or similar orchestration. See [@jaypie/cdk](https://github.com/finlaysonstudio/jaypie-cdk).
95
93
 
96
94
  ## 📖 Reference
97
95
 
@@ -214,7 +212,6 @@ See `HTTP` for status codes.
214
212
  * `HTTP.HEADER`: ...
215
213
  * `HTTP.METHOD`: `GET`, `POST`, ...
216
214
 
217
-
218
215
  #### `VALIDATE`
219
216
 
220
217
  * `VALIDATE.ANY` - Default
@@ -403,6 +400,26 @@ const string = placeholders("Hello, {name}!", { name: "World" });
403
400
 
404
401
  The code for placeholders was written by Chris Ferdinandi and distributed under the MIT License in 2018-2019. Their web site is https://gomakethings.com
405
402
 
403
+ #### `sleep`
404
+
405
+ `sleep` is a promise-based `setTimeout` that resolves after a specified number of milliseconds. It will NOT run when `NODE_ENV` is `test`. See `sleepAlways` for a version that will run in tests.
406
+
407
+ ```javascript
408
+ import { sleep } from "jaypie";
409
+
410
+ await sleep(2000);
411
+ ```
412
+
413
+ #### `sleepAlways`
414
+
415
+ `sleepAlways` is a promise-based `setTimeout` that resolves after a specified number of milliseconds. It will run even when `NODE_ENV` is `test`. See `sleep` for a version that will NOT run in tests.
416
+
417
+ ```javascript
418
+ import { sleepAlways } from "jaypie";
419
+
420
+ await sleepAlways(2000);
421
+ ```
422
+
406
423
  #### `validate`
407
424
 
408
425
  ```javascript
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jaypie",
3
- "version": "1.0.18",
3
+ "version": "1.0.19",
4
4
  "author": "Finlayson Studio",
5
5
  "type": "module",
6
6
  "exports": {
@@ -28,12 +28,12 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "@jaypie/aws": "^1.0.5",
31
- "@jaypie/core": "^1.0.23",
31
+ "@jaypie/core": "^1.0.24",
32
32
  "@jaypie/lambda": "^1.0.4",
33
33
  "@jaypie/mongoose": "^1.0.6"
34
34
  },
35
35
  "devDependencies": {
36
- "@jaypie/testkit": "^1.0.17",
36
+ "@jaypie/testkit": "^1.0.18",
37
37
  "@rollup/plugin-commonjs": "^25.0.7",
38
38
  "@rollup/plugin-node-resolve": "^15.2.3",
39
39
  "eslint": "^8.57.0",