be-exporting
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

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:

Package Sidebar

Install

npm i be-exporting

Weekly Downloads

2

Version

0.0.4

License

MIT

Unpacked Size

8.24 kB

Total Files

7

Last publish

Collaborators

  • bahrus