Any networked computer can be a server Any networked computer can be a client
Package a put in a little pieces.
TCP - reliable transport: has ACK
let Observable = Rx.Observable; | |
let div:Element = document.querySelector('.to-drag'); | |
let mousedown = Observable.fromEvent(div, 'mousedown'); | |
let mouseup = Observable.fromEvent(document, 'mouseup'); | |
let mousemove = Observable.fromEvent(document, 'mousemove'); | |
mousedown.forEach((e) => { | |
return mousemove |
am e,bedded key/value database. Is good to be a modular database. If you wanna run applications on browser as well as in node.
its embedded it is in the same process. It lives in the program. It was built for chrome.
Since leveldb is a standalone database, you can install it with npm:
import { define } from "osagai"; | |
import { on } from "osagai/events"; | |
import { update } from "osagai/dom"; | |
function Todos({ element, query }) { | |
on("click", query(".btn"), () => { | |
update(element, (items = []) => { | |
items.push({ | |
name: `Item nr ${items.length + 1}` | |
}); |
import { define } from 'osagai' | |
import { on } from 'osagai/events' | |
function FancyButton({ query }) { | |
on('click', query('.btn'), () => { | |
console.log('Clicked') | |
}) | |
return () => '<button class="btn">Click me</button>' | |
} |
import { define } from "osagai"; | |
function HelloComponent() { | |
return () => "<div>Hello</div>"; | |
} | |
define("hello-world", HelloComponent); |
Ramda and lodash/fp already curry a lot of functions.
Currying: if you know the function is curried, ex the docs say that a function has 3 arguments, if you execute the first time with one argument, it will return a new function.
Functions can "meld" aka compose
. If we have functions f, g and h.