pluggable.js takes mins to add a plugin architecture in your JavaScript project
pluggable.js is a tiny library that lets you make your JS project extendable via plugins, while still keeping sensitive objects and data private through closures.
What is pluggable.js?
pluggable.js lets you make your JS project extendable via plugins, while still keeping sensitive objects and data private within es2015 modules or through closures.
It was originally written for converse.js, to provide a plugin architecture that allows 3rd party developers to extend and override private objects and backbone.js classes, but it does not require nor depend on either library.
Size and dependencies
pluggable.js depends on 8 lodash functions and provides a custom lodash build with only these functions in the 3rdparty/ directory.
Pluggable.js itself is only 2.5KB when minified and the custom lodash build is 26KB when minified (both without gzip compression).
Features
- Easy to use
- Minimal footprint and code integration
- Developer-friendly documentation
- Used in production-ready projects
- Developers can save a huge deal of time in creating plugins
- Open-source
License
pluggable.js is released under the MIT License.
Resources
- pluggable.js
- https://conversejs.org/
- https://github.com/conversejs/pluggable.js
- https://medevel.com/28-os-xmpp-clients/