Skip to content

Commit

Permalink
Let's go for v0.2.2!
Browse files Browse the repository at this point in the history
  • Loading branch information
arguiot committed Jul 6, 2017
1 parent 5a5ec70 commit aa5ea1f
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 22 deletions.
22 changes: 11 additions & 11 deletions dist/display.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -484,32 +484,32 @@ class DisplayJS {
}
predict(array, val) {
function main(valC) {
var first = array[0][0]
var second = array[1][0]
var firstVal = array[0][1]
var secondVal = array[1][1]
var a = (firstVal - secondVal) / (first - second)
var b = secondVal - (second * a)
const first = array[0][0];
const second = array[1][0];
const firstVal = array[0][1];
const secondVal = array[1][1];
const a = (firstVal - secondVal) / (first - second);
const b = secondVal - (second * a);
return valC * a + b;
}
function patternMatching (array) {
if (array.length > 2) {
if (main(array[2][0]) == array[2][1]) {
return true
return true;
}
else {
return false
return false;
}
}
else {
return true
return true;
}
}
if (patternMatching(array)) {
return main(val)
return main(val);
}
else {
return "DisplayJS: Error, can't find any pattern."
return "DisplayJS: Error, can't find any pattern.";
}

}
Expand Down
10 changes: 7 additions & 3 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta charset="utf-8">
<link rel="alternate" hreflang="en-US" href="">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>DisplayJS - A simple framework for building ambitious UIs</title>
<title>DisplayJS - A simple JS framework for building ambitious UIs</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="apple-touch-icon" href="apple-touch-icon.png">
Expand Down Expand Up @@ -58,7 +58,7 @@ <h1 class="title">DisplayJS</h1>
<div id="particles-js"></div>
<img class="logo" src="img/logo-white.svg" alt="DisplayJS' logo" height="150px">
<h1>DisplayJS</h1>
<p>A simple framework for building ambitious UI, without thinking about how the text will be displayed.</p>
<p>A simple JavaScript framework for building ambitious UIs</p>
</div>
<div class="footer-fixed">
Made with ❤️ by <i class="fa fa-twitter" aria-hidden="true"></i> <a href="https://twitter.com/arthur_guiot" class="twitter-a">@arthur_guiot</a>
Expand Down Expand Up @@ -93,9 +93,13 @@ <h2>You don't need <a href="jquery.com">jQuery</a></h2>
<hr>
<p>Ok, I know, <a href="jquery.com">jQuery</a> is fantastic! But, you don't always need it for a lot of things. The most important concepts of events are in Display JS, it means that all concepts that you already knows are in it, so, you'll have less troubles learning Display JS.</p>
</section>
<section>
<h2>Math Powered</h2>
<p>DisplayJS includes some super useful functions about Math, Array manipulation and even dataset prediction! If DisplayJS is including these function, it's because we want that you only need 1 single framework to do everything. We don't want you to use DisplayJS, jQuery, Lodash, or other Library when you don't need them (but you can still use them if you really need to (math.js, moment.js, etc...))</p>
</section>
<footer>
<h3>Conclusion</h3>
<p>If you were disapointed with Vue.js, React, etc... If you want something super simple to build UI, just try DisplayJS!</p>
<p>If you were disapointed with Vue.js, React, etc... If you want something super simple to build UI, just try DisplayJS! We hope you'll choose DisplayJS next time you do something great!</p>
</footer>
</article>
<aside>
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "display.js",
"version": "v0.2.1",
"description": "A simple framework for building ambitious UI, without thinking about how the text will be displayed.",
"version": "v0.2.2",
"description": "A simple JavaScript framework for building ambitious UIs",
"main": "dist/display.min.js",
"directories": {
"doc": "docs"
Expand Down
12 changes: 6 additions & 6 deletions src/display.js
Original file line number Diff line number Diff line change
Expand Up @@ -484,12 +484,12 @@ class DisplayJS {
}
predict(array, val) {
function main(valC) {
var first = array[0][0];
var second = array[1][0];
var firstVal = array[0][1];
var secondVal = array[1][1];
var a = (firstVal - secondVal) / (first - second);
var b = secondVal - (second * a);
const first = array[0][0];
const second = array[1][0];
const firstVal = array[0][1];
const secondVal = array[1][1];
const a = (firstVal - secondVal) / (first - second);
const b = secondVal - (second * a);
return valC * a + b;
}
function patternMatching (array) {
Expand Down

0 comments on commit aa5ea1f

Please sign in to comment.