Skip to content

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

Ֆունկցիա: isFactoried() ​

isFactoried(plugin): boolean

Բետա

Ճշմարիտ է, երբ պլագինը ստեղծվել է 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