Legend:
- βοΈ method changes
this
. - π method does not change
this
.
Array<T>.prototype.*
:
concat(...items: Array: T[]
π ES3
// Simple gist to test parallel promise resolution when using async / await | |
function promiseWait(time) { | |
return new Promise((resolve, reject) => { | |
setTimeout(() => { | |
resolve(true); | |
}, time); | |
}); | |
} |
In this article I will take a very simplistic approach in understanding memory leaks and I will also attempt to diagnose them.
In todays world of abundant memory, we seldom worry about memory leakages. But I hate to tell you that we live in a real world and nothing comes for free.
Disclosure: I absolutely love functional programming. Functional programming is cool and with the new ES6 syntax it becomes even cooler.
upstream websocket { | |
server localhost:3000; | |
} | |
server { | |
listen 80; | |
server_name localhost; | |
access_log /var/log/nginx/websocket.access.log main; |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.
Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:
getTweetsFor("domenic", function (err, results) {
// the rest of your code goes here.