Skip to content

Instantly share code, notes, and snippets.

@bmeck

bmeck/snippit.js Secret

Created February 16, 2017 19:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bmeck/c01f47fa95ca21a5f4901746df61885d to your computer and use it in GitHub Desktop.
Save bmeck/c01f47fa95ca21a5f4901746df61885d to your computer and use it in GitHub Desktop.
const bootstrapModule = COMPILE(`
${exportsTemplate(
(name) => `let $${name}; export {$${name} as ${name}};\n`
)}
// reflect api
;({
exports: {
${exportsTemplate(
(name) => `"${name}": {
set: (v) => (void $${name} = v),
get: (v) => $${name},
};\n`
)}
};
});
`);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment