UNPKG

@ultraviolet/illustrations

Version:
21 lines (19 loc) 642 B
import { __esmMin, __name } from "../../_rolldown/runtime.js"; import { _typeof, init_typeof } from "./typeof.js"; //#region \0@oxc-project+runtime@0.120.0/helpers/toPrimitive.js function toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } var init_toPrimitive = __esmMin(() => { init_typeof(); }); //#endregion init_toPrimitive(); export { init_toPrimitive, toPrimitive };