Skip to content

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

函式: isFactoried() ​

isFactoried(plugin): boolean

Beta(測試)

當一個插件是由 definePlugin(或 extendPlugin)建立時,為 true。

參數 ​

plugin ​

PantokenPlugin

回傳 ​

boolean

範例 ​

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

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