Skip to content

pantoken-root / packages/plugin-kit/src / isFactoried

函数: isFactoried() ​

isFactoried(plugin): boolean

Beta

当插件由 definePlugin(或 extendPlugin)创建时为真。

参数 ​

plugin ​

PantokenPlugin

返回值 ​

boolean

示例 ​

ts
import { definePlugin, isFactoried } from "@pantoken/plugin-kit";

isFactoried(definePlugin({ name: "brand", css: () => ({}) })); // → true
isFactoried({ name: "hand-written", css: () => ({}) });        // → false