@ztimson/utils 0.24.1 → 0.24.3

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/misc.d.ts CHANGED
@@ -3,9 +3,10 @@ import { PathEvent } from './path-events.ts';
3
3
  * Run a stringified function with arguments asynchronously
4
4
  * @param {object} args Map of key/value arguments
5
5
  * @param {string} fn Function as string
6
- * @return {Promise<T>} Function string response
6
+ * @param {boolean} async Run with async (returns a promise)
7
+ * @return {T | Promise<T>} Function return result
7
8
  */
8
- export declare function asyncFunction<T>(args: object, fn: string): Promise<T>;
9
+ export declare function fn<T>(args: object, fn: string, async?: boolean): T;
9
10
  /**
10
11
  * Get profile image from Gravatar
11
12
  *
package/dist/search.d.ts CHANGED
@@ -1,2 +1,8 @@
1
1
  export declare function search(rows: any[], search: string, regex?: boolean, transform?: Function): any[];
2
- export declare function testCondition(condition: string, row: any): boolean;
2
+ /**
3
+ * Test an object against a logic condition. By default values are checked
4
+ * @param {string} condition
5
+ * @param {object} target
6
+ * @return {boolean}
7
+ */
8
+ export declare function logicTest(target: object, condition: string): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ztimson/utils",
3
- "version": "0.24.1",
3
+ "version": "0.24.3",
4
4
  "description": "Utility library",
5
5
  "author": "Zak Timson",
6
6
  "license": "MIT",