Permalink
Browse files

use native extend forEach

  • Loading branch information...
voloko committed Feb 28, 2011
1 parent 9190021 commit c23d8953cae4c55613e9a97fa7de66ed14ca975f
Showing with 11 additions and 13 deletions.
  1. +6 −8 src/uki-core.js
  2. +5 −5 src/uki-view.js
View
@@ -44,16 +44,16 @@ function uki(val, context) {
return builder.build(val);
}
-uki.version = '0.4.0a1';
+uki.version = '0.4.0a2';
// push everything into core namespace
-utils.forEach([
+utils.extend(
+ uki,
+
env, utils, fun, dom, evt, gesture, builder, selector,
after, observable, binding, attachment, collection,
mustache
-], function(mod) {
- utils.extend(uki, mod);
-});
+);
@@ -68,9 +68,7 @@ uki.view = view;
builder.viewNamespaces.unshift(view);
// copy views from default view namespaces into view
-utils.forEach([base, container], function(mod) {
- utils.extend(view, mod);
-});
+utils.extend(view, base, container);
// export uki
module.exports = uki;
View
@@ -2,19 +2,19 @@ requireCss('./uki-view/uki.css');
var view = require('./uki-core/view.js'),
utils = require('./uki-core/utils.js');
+
+utils.extend(
+ view,
-utils.forEach([
require('./uki-view/view/focusable.js'),
require('./uki-view/view/selectable.js'),
-
+
require('./uki-view/view/button.js'),
require('./uki-view/view/flow.js'),
require('./uki-view/view/nativeControl.js'),
require('./uki-view/view/text.js'),
require('./uki-view/view/splitPane.js'),
require('./uki-view/view/dataList.js')
-], function(mod) {
- utils.extend(view, mod);
-});
+);
module.exports = view;

0 comments on commit c23d895

Please sign in to comment.