Skip to content

Commit

Permalink
ax5core 0.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasJang committed Feb 9, 2016
1 parent 25850a8 commit 7cd8410
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 35 deletions.
6 changes: 3 additions & 3 deletions API-ax5-mustache.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Output:
* Ringo Star (3) (false)
```

## Object.getEach
## Object.@each

View:
```js
Expand All @@ -67,9 +67,9 @@ View:
Template:
```
{{#beatles}}
{{#getEach}}
{{#@each}}
* {{@key}} : {{@value.firstName}} {{@value.lastName}}
{{/getEach}}
{{/@each}}
{{/beatles}}
```

Expand Down
23 changes: 9 additions & 14 deletions dist/ax5core.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,8 @@
var
result = false
;
if(!O){ }
if (!O) {
}
else if (O instanceof Date && !isNaN(O.valueOf())) {
result = true;
}
Expand Down Expand Up @@ -1792,17 +1793,11 @@
}
})();

if (typeof module === "object" && module && 'exports' in module) {
module.exports = ax5; // commonJS
}
else {
root.ax5 = ax5;
if (typeof define === "function" && define.amd) define("_ax5", [], function () {
return ax5;
}); // requireJS
}
root.ax5 = (function () {
return ax5;
})(); // ax5.ui에 연결

}).call(this);
}).call(window);
// 필수 Ployfill 확장 구문
(function () {
'use strict';
Expand Down Expand Up @@ -1978,7 +1973,7 @@
'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');
while (prop = properties.pop()) con[prop] = con[prop] || empty;
while (method = methods.pop()) con[method] = con[method] || dummy;
})(root.console = root.console || {}); // Using `this` for web workers.
})(window.console || {}); // Using `this` for web workers.

// extend innerWidth ..
var html = document.getElementsByTagName('html')[0];
Expand All @@ -1989,7 +1984,7 @@
if (!window.scrollX) window.scrollX = window.pageXOffset || html.scrollLeft;
if (!window.scrollY) window.scrollY = window.pageYOffset || html.scrollTop;

}.call(this));
}.call(window));
/**
* Refer to this by {@link ax5}.
* @namespace ax5.ui
Expand Down Expand Up @@ -2426,7 +2421,7 @@ ax5.ui = (function (core) {
this.view = view;
this.cache = {
'.': this.view,
'getEach': function () {
'@each': function () {
var returns = [];
for (var k in this) {
returns.push({'@key': k, '@value': this[k]});
Expand Down
2 changes: 1 addition & 1 deletion dist/ax5core.min.js
100644 → 100755

Large diffs are not rendered by default.

19 changes: 7 additions & 12 deletions src/ax5-core.js
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,8 @@
var
result = false
;
if(!O){ }
if (!O) {
}
else if (O instanceof Date && !isNaN(O.valueOf())) {
result = true;
}
Expand Down Expand Up @@ -1792,14 +1793,8 @@
}
})();

if (typeof module === "object" && module && 'exports' in module) {
module.exports = ax5; // commonJS
}
else {
root.ax5 = ax5;
if (typeof define === "function" && define.amd) define("_ax5", [], function () {
return ax5;
}); // requireJS
}

}).call(this);
root.ax5 = (function () {
return ax5;
})(); // ax5.ui에 연결

}).call(window);
4 changes: 2 additions & 2 deletions src/ax5-polyfill.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@
'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');
while (prop = properties.pop()) con[prop] = con[prop] || empty;
while (method = methods.pop()) con[method] = con[method] || dummy;
})(root.console = root.console || {}); // Using `this` for web workers.
})(window.console || {}); // Using `this` for web workers.

// extend innerWidth ..
var html = document.getElementsByTagName('html')[0];
Expand All @@ -184,4 +184,4 @@
if (!window.scrollX) window.scrollX = window.pageXOffset || html.scrollLeft;
if (!window.scrollY) window.scrollY = window.pageYOffset || html.scrollTop;

}.call(this));
}.call(window));
2 changes: 1 addition & 1 deletion src/mustache.js
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@
this.view = view;
this.cache = {
'.': this.view,
'getEach': function () {
'@each': function () {
var returns = [];
for (var k in this) {
returns.push({'@key': k, '@value': this[k]});
Expand Down
4 changes: 2 additions & 2 deletions test/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@
+ '</div>'

+ '{{#beatles}}'
+ '{{#getEach}}'
+ '{{#@each}}'
+ '* {{@key}} : {{@value.firstName}} {{@value.lastName}}'
+ '{{/getEach}}'
+ '{{/@each}}'
+ '{{/beatles}}'

;
Expand Down

0 comments on commit 7cd8410

Please sign in to comment.