From 45bbc98268252e460949534c83aabd55a2614b4b Mon Sep 17 00:00:00 2001 From: Stefan Imhoff Date: Tue, 13 Jun 2023 12:39:03 +0200 Subject: [PATCH] feat: add isProduction function --- src/utils/index.ts | 1 + src/utils/is-production.ts | 1 + 2 files changed, 2 insertions(+) create mode 100644 src/utils/is-production.ts diff --git a/src/utils/index.ts b/src/utils/index.ts index 74c750c..7c8b0c0 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -1,5 +1,6 @@ export * from './date'; export * from './format-posts'; +export * from './is-production'; export * from './pick-two-random-colors'; export * from './remark-reading-time'; export * from './remark-widont'; diff --git a/src/utils/is-production.ts b/src/utils/is-production.ts new file mode 100644 index 0000000..cd6b0bf --- /dev/null +++ b/src/utils/is-production.ts @@ -0,0 +1 @@ +export const isProduction = process.env.NODE_ENV === 'production';