Skip to content

Commit 48f540e

Browse files
committed
chore: add utils/plugin
1 parent 547f66a commit 48f540e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/utils/plugin.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import _get from 'lodash.get'
2+
3+
import siteConfig from '@/configs/site'
4+
5+
const { plugins } = siteConfig
6+
7+
export const isPluginEnabled = (pluginName: string) => typeof _get(plugins, pluginName) === 'object'
8+
export const getPluginConfig = (key: string) => _get(plugins, key)

0 commit comments

Comments
 (0)