extendme

Easily extend your js application

Usage no npm install needed!

<script type="module">
  import extendme from 'https://cdn.skypack.dev/extendme';
</script>

README

Extendme library

Easily extend your js application

Usage

import Pluggable from 'extendme';

// Main bus
const p = new Pluggable();

p.on('action', (data) => {
  return new Promise(function (resolve, reject) {
    resolve(data + 2);
  });
  // or
  return data + 2;
});

p.emit('action', data)

// Plugins

const someSuperPlugin = function (p) {
  p.on(...)
};

someSuperPlugin.plugin = {
  name: 'test-name',
  version: '1.0.0', // x or x.x or x.x.x
  dependencies: {
    'some-other-plugin': '1.0'
  }
};

p.plugin(someSuperPlugin);

Build

Use lts/carbon to build.