@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.
@@ -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';
@@ -11,3 +11,4 @@ export * from './ui_utils';
11
11
  export * from './config_utils';
12
12
  export * from './read_utils';
13
13
  export * from './safe_utils';
14
+ export * from './read_utils';
@@ -0,0 +1 @@
1
+ export { safeGlobalProp } from './../safe_utils';
@@ -1,9 +1,6 @@
1
1
  /**
2
- * Reads a file at `relativeOrAbsolutePath` and returns its contents as a string.
3
- * In a browser this will reject immediately.
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 readFileContents(relativeOrAbsolutePath: string): Promise<string>;
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>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putkoff/abstract-utilities",
3
- "version": "0.1.181",
3
+ "version": "0.1.182",
4
4
  "type": "module",
5
5
  "description": "A reusable React Login component with JWT authentication",
6
6
  "main": "dist/cjs/index.js",