Skip to content

Instantly share code, notes, and snippets.

View whitelynx's full-sized avatar
😸

David H. Bronke whitelynx

😸
View GitHub Profile
@whitelynx
whitelynx / .block
Last active August 30, 2016 14:23 — forked from mbostock/.block
Horizon Chart
license: gpl-3.0
// ---------------------------------------------------------------------------------------------------------------------
// PromiseProxy - A proxy object that wraps a promise, and exposes `pending`, `result` and `error` properties. This is
// most useful when setting results of promises on the scope directly, so you can work with them in your templates.
//
// @module promise-proxy.js
// ---------------------------------------------------------------------------------------------------------------------
function PromiseProxyFactory(promise)
{
var proxy = {