Skip to content

pantoken / 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