next-bind
Bind all for next.
installation
npm install -S @jswork/next-bind
usage
import '@jswork/next-bind';
const obj = {
id: 'bold',
type: 'plugin',
events: {
name: function () {
return [this.id, this.type].join('-');
}
},
commands: {
is: function (inMode) {
return this.id === inMode;
},
get: function () {
return this.type;
}
}
};
nx.bind(obj, obj.commands, obj.events);
license
Code released under the MIT license.