Skip to content

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

Συνάρτηση: isFactoried() ​

isFactoried(plugin): boolean

Βήτα

Αληθές όταν ένα plugin δημιουργήθηκε από το 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