Skip to content

Commit

Permalink
Fixed repeat function before release
Browse files Browse the repository at this point in the history
display.min.js didn't handled the repeat function until now.
  • Loading branch information
arguiot committed Dec 11, 2017
1 parent 87b7c33 commit 6674b5d
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 14 deletions.
4 changes: 2 additions & 2 deletions __test__/display.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,15 +188,15 @@ class DisplayJS {
return list;
}
// custom repeat function
repeat(el, object, position="in") {
repeat(el, object) {
el = this.s(el);
const text = el[0].innerHTML;
el[0].innerHTML = ""
// Comes from stackoveflow. @Individual11
function interpolate(str) {
return function interpolate(o) {
return str.replace(/{([^{}]*)}/g, function(a, b) {
const data = o;
window["data"] = o;
let r = eval(b)
return r
});
Expand Down
4 changes: 2 additions & 2 deletions dist/display.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,15 +188,15 @@ class DisplayJS {
return list;
}
// custom repeat function
repeat(el, object, position="in") {
repeat(el, object) {
el = this.s(el);
const text = el[0].innerHTML;
el[0].innerHTML = ""
// Comes from stackoveflow. @Individual11
function interpolate(str) {
return function interpolate(o) {
return str.replace(/{([^{}]*)}/g, function(a, b) {
const data = o;
window["data"] = o;
let r = eval(b)
return r
});
Expand Down
2 changes: 1 addition & 1 deletion dist/display.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/light/display.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,15 +188,15 @@ class DisplayJS {
return list;
}
// custom repeat function
repeat(el, object, position="in") {
repeat(el, object) {
el = this.s(el);
const text = el[0].innerHTML;
el[0].innerHTML = ""
// Comes from stackoveflow. @Individual11
function interpolate(str) {
return function interpolate(o) {
return str.replace(/{([^{}]*)}/g, function(a, b) {
const data = o;
window["data"] = o;
let r = eval(b)
return r
});
Expand Down
2 changes: 1 addition & 1 deletion dist/light/display.es6.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions dist/light/display.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,16 +242,14 @@ var DisplayJS = function () {
}, {
key: "repeat",
value: function repeat(el, object) {
var position = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "in";

el = this.s(el);
var text = el[0].innerHTML;
el[0].innerHTML = "";
// Comes from stackoveflow. @Individual11
function interpolate(str) {
return function interpolate(o) {
return str.replace(/{([^{}]*)}/g, function (a, b) {
var data = o;
window["data"] = o;
var r = eval(b);
return r;
});
Expand Down
Loading

0 comments on commit 6674b5d

Please sign in to comment.