peekobot
peekobot copied to clipboard
Feature: The ability for adding plugins
If our peekobot is a class:
class Peekobot {
constructor() {
this.plugins = Peekobot.prototype;
}
}
var bot = new Peekobot();
bot.plugins.colorPicker = function () {
console.log("Color Picker")
}
bot.colorPicker();
From jquery source:
jQuery.fn = jQuery.prototype = {
end: function() {
return this.prevObject || this.constructor();
}
};
So developers can add plugins like in jquery
It's a great idea but I still need to work on it