(as of UTC – Details)
What this Book Covers
Here is a more detailed breakdown of the book by chapter:
- Objects as Modules – The book starts with the creation of a simple module which returns a single object. A factory based module is introduced that can create multiple objects. Learn how to seal an object to protect it from changes.
- Properties – The next step after defining objects is to add properties. Learn how to add properties that can be enumerated and protected against invalid values.
- Methods – Methods are what functions are called when they are part of an object. Define methods that can accept named parameters. Learn how to chain methods together and guard against invalid parameters.
- Module Parameters – Modules can be passed parameters, just like a functions or methods. Learn how to pass parameters to a module or a factory function to construct objects.
- Named Exports – Instead of returning the whole module, only return part of it. Learn how to export named objects and functions and special techniques for naming factory related exports.
- Inheritance – Modules and objects can be derived from other modules and objects. Learn how to derive and combine objects and override methods in parent objects.
- Callbacks – When using third party libraries with callbacks, care must be taken to integrate them into a module. Learn how to create modules that wrap existing callbacks and define new callbacks.
- Promises – Callbacks calling callbacks calling callbacks can get out of hand. Learn how to create modules that wrap third party callbacks in promises and define new promises.
- Unit Testing – When making changes to a module it is handy to be able to run a suite of tests to make sure that nothing broke. It’s also helpful to make sure that new functionality works as expected. Learn how to create and run unit tests against modules.