UNPKG

fava

Version:

A wannabe tiny largely-drop-in replacement for ava that works in the browser too.

23 lines (22 loc) 458 B
/* IMPORT */ /* HELPERS */ const tapi = { current: {} }; /* MAIN */ //TODO: Publish a polished version of this as a standalone module, "proxy-of" maybe const t = new Proxy({}, { get(target, key) { return tapi.current[key]; }, set(target, key, value) { tapi.current[key] = value; return true; }, has(target, key) { return (key in tapi.current); } }); /* EXPORT */ export default t; export { tapi };