I'm planning to write a JavaScript Plugin. Thus, I would like to know what features/methods are required by most of the plugins for example init, destroy, etc.
Can you please list some common or most wished features / methods that we must include so that the plugin can become easy and useful after sharing it publicly?
Atul Sharma
Full Stack Developer | Cloud Native Applications
Enable methods to be chained, instead of keeping them be called by name only.
var x = "Name"; x.yourMethod1().yourMethod2();Make it configurable . Expose you initialization method / object So, that developers can configure it for their need. Leave possible values of parameters as comments.
var configObj = { color : 'red', //'green', 'blue' model : '2016' // '2015', '2017' }