MoaJs
ExtJs syntax for declaration object inheritance, mixins, static methods / properties / mixins, singleton declaration and IoC container out of the box. Size near 4kB minified JavaScript code and 1,7kB gzip. You can see current version MoaJs in root and release version in release
folder.
Research Documentation
Documentation
MoaJs API
clear
- clear all declared types and mixinsdefine
- declare object type / get constructor by type nameresolve
- get instance by type name with resolved properties, prototype fields and constructor injectionmixin
- declare mixin typegetType
- predefined exemplar method, which return declared type namegetRegistry
- return object with arrays of types and mixinsgetTypeInfo
- return internal information about declared type
Items
Mixins
- Randomise mixin
- rnd from 0 to range
- rnd in range min - max
- Search mixin
- linear search (equal, less, greater)
- binary search (equal, greater)
- Sort mixin
- swap elements
- qsort
- comb sort
- gnome sort
- shaker sort
- insert sort
- binary insert sort
- merge sort
- hybrid merge sort with insert sort
- one array merge sort
- selection sort
Throw Error mixin
Generate error if not right condition
- undefined error
- indexOf error
- notInRange error
- notInstanceOf error
- notObj error
- notFn error
- notStr error
- notEqual error
Changelog
MoaJs v0.1.3 - in process
- IoC implementation: property, prototype and constructor injection
- delete mixins
Moa.mixixn('mix', null)
getTypeInfo
- internal information about typeclear
- delete all declarations$proto
in$di
declaration- create documentation for JsDoc. Result.
MoaJs v0.1.2
getRegistry
- list available types and mixins- Set up release process (version, minification, compression) and save result to
release
folder
MoaJs v0.1.1
- rindomise mixin
- search mixin
- sort mixin
- throw error mixin
- grunt-benchmark for testing performance
MoaJs v0.1.0
- declare object in ExtJs syntax and get it by type name
- object inheritance with $extend by type name
- using $base closure for executin parent constructor or methods
- static methods
- simple 'singleton' declaration
- mixins
- static mixins
- support client side (AMD / direct reference)
- support CommonJs declaration
Performance
Sources of inspirations
License
Copyright © 2013-2014 Sergii Danilov, pencroff.com
MoaJs may be freely distributed under the MIT license.
Feel free to contact me should you require any futher information.