0.1.0 • Published 5 years ago

sahara-action-store v0.1.0

Weekly downloads
1
License
ISC
Repository
-
Last release
5 years ago

Example of use

import ActionStore from 'sahara-action-store';

const actionStore = new ActionStore();

// register function
actionStore.register('foo', () => {
   return 'foo'; 
});

if (actionStore.has('foo')) {
    // call function
    const result = actionStore.call('foo');
    // or get function
    const foo = actionStore.get('foo');
    foo();
}

// unregister function
actionStore.unregister('foo');
0.1.0

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago