@bouko/react 0.5.3 → 0.5.4

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.
@@ -1 +1,2 @@
1
1
  export declare const getFileData: (files: File[]) => Promise<unknown[]>;
2
+ export declare const getEnv: (key: string) => string;
@@ -13,3 +13,9 @@ export const getFileData = (files) => Promise.all(files.map((file) => {
13
13
  reader.readAsDataURL(file);
14
14
  });
15
15
  }));
16
+ export const getEnv = (key) => {
17
+ const value = process.env[key];
18
+ if (!value)
19
+ throw new Error(`Missing required env: ${key}`);
20
+ return value;
21
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
 
3
3
  "name": "@bouko/react",
4
- "version": "0.5.3",
4
+ "version": "0.5.4",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
7
7
  "license": "MIT",