@putkoff/abstract-utilities 0.1.181 → 0.1.182
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/cjs/index.js +103 -72
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +104 -72
- package/dist/esm/index.js.map +1 -1
- package/dist/functions/config_utils/imports.d.ts +1 -0
- package/dist/functions/fetch_utils/imports.d.ts +1 -0
- package/dist/functions/index.d.ts +1 -0
- package/dist/functions/read_utils/imports.d.ts +1 -0
- package/dist/functions/read_utils/src/read_utils.d.ts +4 -7
- package/package.json +1 -1
|
@@ -7,3 +7,4 @@ export type { LogoutButtonProps, FetchVariables, UrlKey } from './../../types';
|
|
|
7
7
|
export { getConfig, loadConfig } from './../config_utils';
|
|
8
8
|
export { callStorage } from './../safe_utils';
|
|
9
9
|
export { getWindowHost } from './../safe_utils';
|
|
10
|
+
export { readJsonFile } from './../read_utils';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { safeGlobalProp } from './../safe_utils';
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Reads a file
|
|
3
|
-
*
|
|
2
|
+
* Reads a JSON file, either via Node’s fs (if available)
|
|
3
|
+
* or via window.fetch in the browser. Never throws — returns
|
|
4
|
+
* the parsed object or null on any error.
|
|
4
5
|
*/
|
|
5
|
-
export declare function
|
|
6
|
-
/**
|
|
7
|
-
* Reads a JSON file and returns the parsed object.
|
|
8
|
-
*/
|
|
9
|
-
export declare function readJsonFile<T = any>(relativeOrAbsolutePath: string): Promise<T>;
|
|
6
|
+
export declare function readJsonFile<T = any>(relativeOrAbsolutePath: string): Promise<T | null>;
|