@creejs/commons-lang 2.1.29 → 2.1.31

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@creejs/commons-lang",
3
- "version": "2.1.29",
3
+ "version": "2.1.31",
4
4
  "description": "Commons Utils About Language, used inside creejs",
5
5
  "keywords": [
6
6
  "commons",
package/types/_error.d.ts CHANGED
@@ -15,6 +15,13 @@ export default class _Error extends Error {
15
15
  static isErrorLike(err: {
16
16
  [key: string]: any;
17
17
  }): boolean;
18
+ /**
19
+ *
20
+ * @param {string} message
21
+ * @param {number} time ms
22
+ * @returns {_Error}
23
+ */
24
+ static timeout(message: string, time: number): _Error;
18
25
  /**
19
26
  * "412 Precondition Failed" indicates that one or more conditions
20
27
  * given in the request header fields evaluated to false when tested on the server.
@@ -27,7 +34,7 @@ export default class _Error extends Error {
27
34
  * @param {string} message
28
35
  * @returns {_Error}
29
36
  */
30
- static PreconditionFailed(message: string): _Error;
37
+ static preconditionFailed(message: string): _Error;
31
38
  /**
32
39
  * Creates and returns a 404 Not Found error instance with the given message.
33
40
  * @param {string} message - The error message to include.
@@ -1,3 +1,13 @@
1
+ /**
2
+ *
3
+ * @param {{[key:string]:any}} obj
4
+ * @param {string} path
5
+ * @param {any} [defaultValue]
6
+ * @returns
7
+ */
8
+ export function get(obj: {
9
+ [key: string]: any;
10
+ }, path: string, defaultValue?: any): any;
1
11
  /**
2
12
  * Gets the constructor name of a value.
3
13
  * @param {*} value - The value to check.
@@ -77,6 +87,7 @@ export function isBrowser(): boolean;
77
87
  */
78
88
  export function isNode(): boolean;
79
89
  declare namespace _default {
90
+ export { get };
80
91
  export { constructorName };
81
92
  export { defaults };
82
93
  export { extend };