CommonJS pattern in commonly used in many javascript frameworks, libraries and environments. The best example is Node.js. The objective of this pattern is to encapsulate your javascript files into reusable modules so that it can be referenced by other modules.
- Get reference to dependency
- Declare Module
- Expose to others
No comments:
Post a Comment