0.0.4 • Published 4 months ago

be-exporting v0.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

be-exporting

Export JS constants from inline script attributes.

NPM version How big is this package in your project? Playwright Tests

<div be-exporting='of onload.' onload="export const test='hello';"></div>

To access the export const symbols:

const enhancement = await oDiv.beEnhanced.whenResolved('be-exporting');
const {onload} = enhancement;
const {test} = onload;

Viewing Demos Locally

Any web server that can serve static files will do, but...

  1. Install git.
  2. Fork/clone this repo.
  3. Install node.js.
  4. Open command window to folder where you cloned this repo.
  5. npm install

  6. npm run serve

  7. Open http://localhost:3030/demo/ in a modern browser.

Running Tests

> npm run test

Using from ESM Module:

import 'be-exporting/be-exporting.js';

Using from CDN: