Commit 009bc48c authored by Tristan Cavelier's avatar Tristan Cavelier

jio.js amd compatible now

parent effc66a8
...@@ -4,8 +4,16 @@ ...@@ -4,8 +4,16 @@
* http://www.gnu.org/licenses/lgpl.html * http://www.gnu.org/licenses/lgpl.html
*/ */
(function (scope, hex_md5) { // define([module_name], [dependencies], module);
(function (dependencies, module) {
"use strict"; "use strict";
if (typeof define === 'function' && define.amd) {
return define(dependencies, module);
}
window.jIO = module(hex_md5);
}(['md5'], function (hex_md5) {
"use strict";
var localstorage; var localstorage;
if (typeof localStorage !== "undefined") { if (typeof localStorage !== "undefined") {
localstorage = { localstorage = {
......
return jioNamespace;
Object.defineProperty(scope, "jIO", { }));
configurable: false,
enumerable: false,
writable: false,
value: jioNamespace
});
}(window, hex_md5));
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment