Take Cycle's primal example, on the README:
import Cycle from 'cyclejs';
let {Rx, h} = Cycle;
let name$ = Cycle.createStream(function model(changeName$) {| $g = array( | |
| 'halley' => 'amarelo', | |
| 'encke' => 'vermelho', | |
| 'wolf' => 'preto', | |
| 'kushida' => 'azul' | |
| ); | |
| $l = array( | |
| 'a' => 1, | |
| 'z' => 26 |
| return movieLists.map( | |
| // map receives 3 args | |
| // cat - element to iterate | |
| // cIndex - index in the array of the element | |
| // cCollection - movieLists array | |
| // same applies for the rest if the code | |
| (cat, cIndex, cCollection) => { | |
| //v for videos object | |
| return cat.videos.map ( (v,vIndex,vCollection) => { |
Take Cycle's primal example, on the README:
import Cycle from 'cyclejs';
let {Rx, h} = Cycle;
let name$ = Cycle.createStream(function model(changeName$) {You can verify that you have node.js by running node -v and you should see something like v0.12.7
| apt update | |
| apt -y install wget gnupg dirmngr | |
| wget -q -O - https://archive.kali.org/archive-key.asc | gpg --import | |
| gpg --keyserver hkp://keys.gnupg.net --recv-key 44C6513A8E4FB3D30875F758ED444FF07D8D0BF6 | |
| echo "deb http://http.kali.org/kali kali-rolling main non-free contrib" >> /etc/apt/sources.list | |
| gpg -a --export ED444FF07D8D0BF6 | sudo apt-key add - | |
| apt update | |
| apt -y upgrade | |
| apt -y dist-upgrade | |
| apt -y autoremove --purge |
| convert("one hundred five"); // "105" | |
| convert("six hundred and fifty three"); // "653" | |
| convert("zero zero one two three"); // "123" | |
| convert("twelve o three"); // "1203" | |
| convert("thirteen zero nine"); // "1309" | |
| convert("fifteen sixteen"); // "1516" | |
| convert("fourteen ninety two"); // "1492" | |
| convert("nineteen ten"); // "1910" | |
| convert("twelve hundred"); // "1200" | |
| convert("twenty three hundred"); // "2300" |