diff options
| author | rxliuli <rxliuli@gmail.com> | 2025-11-04 05:03:50 +0800 |
|---|---|---|
| committer | rxliuli <rxliuli@gmail.com> | 2025-11-04 05:03:50 +0800 |
| commit | bce557cc2dc767628bed6aac87301a1be7c5431b (patch) | |
| tree | b51a051228d01fe3306cd7626d4a96768aadb944 /shared/featurekit | |
init commit
Diffstat (limited to 'shared/featurekit')
| -rw-r--r-- | shared/featurekit/src/is-enabled.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/shared/featurekit/src/is-enabled.ts b/shared/featurekit/src/is-enabled.ts new file mode 100644 index 0000000..eda506f --- /dev/null +++ b/shared/featurekit/src/is-enabled.ts @@ -0,0 +1,7 @@ +export const isEnabled = (key: string): boolean => { + if (typeof window !== 'undefined') { + return window._featureKit?.isEnabled(key) ?? false; + } + + return false; +}; |
