0.1.2 • Published 4 years ago
avoif v0.1.2
Avoif
Use this library to avoid the use of unscalable if statements
Usage
const { Avoif } = require('avoif');
const avoif = new Avoif({param: 'status', operator: '==', value: 'publish'}, () => 'Hi from first Node');
avoif.set({param: 'status', operator: '==', value: 'unpublish'}, () => 'Hi from second Node');
const callback = avoif.get({status: 'publish'})
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.