peekobot icon indicating copy to clipboard operation
peekobot copied to clipboard

Feature: The ability for adding plugins

Open nikas-belogolov opened this issue 4 years ago • 0 comments

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

nikas-belogolov avatar Sep 06 '20 07:09 nikas-belogolov