OLD | NEW |
1 (function (mod) { | 1 (function (mod) { |
2 if (typeof exports == "object" && typeof module == "object") // CommonJS | 2 if (typeof exports == "object" && typeof module == "object") // CommonJS |
3 module.exports = mod(); | 3 module.exports = mod(); |
4 else if (typeof define == "function" && define.amd) // AMD | 4 else if (typeof define == "function" && define.amd) // AMD |
5 return define([], mod); | 5 return define([], mod); |
6 else // Plain browser env | 6 else // Plain browser env |
7 this.JsUtil = mod(); | 7 this.JsUtil = mod(); |
8 })(function () { | 8 })(function () { |
9 "use strict"; | 9 "use strict"; |
10 | 10 |
11 function JsUtil() { | 11 function JsUtil() { |
12 } | 12 } |
13 | 13 |
14 JsUtil.newObject = function () { | 14 JsUtil.newObject = function () { |
15 return {}; | 15 return {}; |
16 }; | 16 }; |
17 | 17 |
18 JsUtil.getValue = function (obj, prop) { | 18 JsUtil.getValue = function (obj, prop) { |
19 return obj[prop]; | 19 return obj[prop]; |
20 }; | 20 }; |
21 | 21 |
22 return JsUtil; | 22 return JsUtil; |
23 }); | 23 }); |
OLD | NEW |