From 9c2e578fd9f3eca3ca2c9db05f298c2a18415b2d Mon Sep 17 00:00:00 2001 From: Arthur Guiot Date: Sat, 9 Sep 2017 23:04:34 +0800 Subject: [PATCH] Just fixed eslint error --- dist/display.es6.js | 14 +++++++------- dist/light/display.es6.js | 4 ++-- src/base.js | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/dist/display.es6.js b/dist/display.es6.js index ee6a0e9..d5e5e33 100644 --- a/dist/display.es6.js +++ b/dist/display.es6.js @@ -418,8 +418,8 @@ class DisplayJS { prior.parentNode.insertBefore(script, prior); } sleep(ms){ - const waitUntil = new Date().getTime() + ms; - while(new Date().getTime() < waitUntil) true; + const waitUntil = new Date().getTime() + ms; + while(new Date().getTime() < waitUntil) true; } // Math and array manipulation + includes extend( defaults, options ) { @@ -464,10 +464,10 @@ class DisplayJS { return array.reduce((a, b) => a.concat(b), []); } drop(array, val) { - return val > 0 ? array.slice(val, array.length) : array.slice(0, array.length + val) + return val > 0 ? array.slice(val, array.length) : array.slice(0, array.length + val); } isIn(array, val) { - return array.includes(val) ? true : false + return array.includes(val) ? true : false; } rmFromArray(array, condition) { const obj = []; @@ -511,8 +511,8 @@ class DisplayJS { } get(url, callback, parse=false) { this.ajax(url, "GET", "", (data) => { - parse ? callback(JSON.parse(data)) : callback(data) - }) + parse ? callback(JSON.parse(data)) : callback(data); + }); } // create your own $.var() like function custom(targetAttr, callback, push) { @@ -798,7 +798,7 @@ class DisplayJS { } then(toCall, callback) { try { - callback(toCall()) + callback(toCall()); } catch (e) { throw "DisplayJS: " + e; } diff --git a/dist/light/display.es6.js b/dist/light/display.es6.js index be4f2c9..f1a59b1 100644 --- a/dist/light/display.es6.js +++ b/dist/light/display.es6.js @@ -418,8 +418,8 @@ class DisplayJS { prior.parentNode.insertBefore(script, prior); } sleep(ms){ - const waitUntil = new Date().getTime() + ms; - while(new Date().getTime() < waitUntil) true; + const waitUntil = new Date().getTime() + ms; + while(new Date().getTime() < waitUntil) true; } // Math and array manipulation + includes extend( defaults, options ) { diff --git a/src/base.js b/src/base.js index be4f2c9..f1a59b1 100644 --- a/src/base.js +++ b/src/base.js @@ -418,8 +418,8 @@ class DisplayJS { prior.parentNode.insertBefore(script, prior); } sleep(ms){ - const waitUntil = new Date().getTime() + ms; - while(new Date().getTime() < waitUntil) true; + const waitUntil = new Date().getTime() + ms; + while(new Date().getTime() < waitUntil) true; } // Math and array manipulation + includes extend( defaults, options ) {