A microkernel for modular javascript, a toolchain for modern front-end, a micro-framework for growable WebApp.

Mo

  • A collection of OzJS core modules that form a library called “Mo”

In NodeJS


npm install mo

In browser

AMD and OzJS

Get the Code

Add to your project as new dependency

Or download directly from Github

Modules Overview

Examples

API and usage

mo/lang


var _ = require('mo/lang');

mo/lang/es5


require('mo/lang/es5'); // Add ES5 methods in browsers that don't natively support them

mo/lang/type


var _ = require('mo/lang/type');

mo/lang/mix


var _ = require('mo/lang/mix');

mo/lang/oop


var _ = require('mo/lang/oop');

var List = _.construct(Array, /*mixes, */function(){
    this.superConstructor.apply(this, arguments);
    this.a = 1;
});

List.prototype.forEach = function(){
    return this.superMethod('forEach', arguments);
};

mo/lang/struct


var _ = require('mo/lang/struct');

mo/domready


require(['mo/domready'], function(none){
    // won't execute until the page's entire DOM has loaded
});

mo/browsers


var browsers = require('mo/browsers');

mo/cookie


var cookie = require('mo/cookie');

cookie(name, value, {
    domain: 'ozjs.org', // '' as default
    path: '/', // '' as default
    expires: 365 // day,
    secure: ''
});

mo/template


var tpl = require('mo/template');

mo/template/string


var tpl = require('mo/template/string');

mo/template/micro


var tpl = require('mo/template/micro');

mo/network


var net = require('mo/network');

mo/network/ajax


var net = require('mo/network/ajax');

mo/easing


var easingLib = require('mo/easing');

// use it as extension of other library

var $ = require('jquery');
$.easing['jswing'] = $.easing['swing'];
$.extend($.easing, easingLib.functions);

require('mo/mainloop').config({
    easing: easingLib.functions
});

require('choreo').config({
    easing: easingLib
});

mo/mainloop


var loop = require('mo/mainloop');

mo/key


var Key = require('mo/key');

var key = Key(config);

mo/console


var console = require('mo/console');

Under construction

More References

See OzJS Project Homepage

Release History

See OzJS Release History

License

Copyright (c) 2010 - 2013 dexteryy
Licensed under the MIT license.