Lilo-js
Compose lightweight and modular javascript components.
Features
- write modules as simple object literals
- inherit from other modules (prototype pattern)
- include other modules (mixin pattern)
- fine-tune inheritance and inclusion with composition options ('omit', 'select', 'merge')
- expose utility functions used internally
Coming Soon
- loadable modules in AMD, CommonJs and Browser Globals
- conditionally load replacement for
$.extend
Writing Components
The base component MUST be in the prototype chain of ALL your custom components. It comes with two useful methods to create inheriting objects:
include
to add own properties from another objectextend
to create an inheriting object, and optionally mixin own properties from other objects.
API
Define and register component with Lilo
var Lilo = ;var Base = ;var Collapse = ;var Panel = ; // register and expose componentvar CollapsePanel = Base; // register componentmoduleexports = ;
Baked in utility functions
var Lilo = ;Liloutil = ; Liloutil;Liloutil;Liloutil;Liloutil;Liloutil;Liloutil;Liloutil;