UNPKG

ajo

Version:

ajo is a JavaScript view library for building user interfaces

12 lines (11 loc) 293 B
const e = Symbol.for("ajo.context"), r = (t, o = Symbol()) => function(...l) { const n = this ?? c; return n ? l.length ? n[e][o] = l[0] : o in n[e] ? n[e][o] : t : t; }; let c = null; const s = (...t) => t.length ? c = t[0] : c; export { e as Context, r as context, s as current };