Skip to content

Instantly share code, notes, and snippets.

eventsource
go-eventsource
client/client
@jinroh
jinroh / await.js
Created April 21, 2013 16:09 — forked from domenic/await.js
Await and yield
// Let `doAjax`, `fadeIn`, `fadeOut`, and `delay` be promise-returning functions.
// In all the following examples, `example` is meant to return a promise that is fulfilled when
// all operations are completed, or rejected if any of the steps fail.
// ES5
function example() {
return doAjax("data.json").then(function (data) {
document.getElementById("data").innerText = data;
@jinroh
jinroh / ecma5_on_v8.js
Created December 2, 2012 19:20 — forked from Jxck/ecma5_on_v8.js
ECMA 5 Features in V8
/**
* The sample usage of ECMA 5 Mozilla Features Implemented in V8
* https://github.com/joyent/node/wiki/ECMA-5-Mozilla-Features-Implemented-in-V8
* You can use thease new feature of ECMA5 on Node.js as you like.
* because there is no IE :)
* Order is deferent form original wiki.
* Sources are Checked on Node.js v0.5.0(unstable), v0.4.9(stable)
*
* you can execute this file.
* $ node ecma5_on_v8.js