UNPKG

@anywhichway/lazui

Version:

Single page apps and lazy loading sites with minimal JavaScript or client build processes.

12 lines (10 loc) 259 B
async function usejson({attribute,lazui}) { lazui.useJSON = useJSON; await import(attribute.value).then(({default:json}) => { lazui.useJSON(json); }) } function useJSON(json) { this.JSON = json; } export {usejson,useJSON};