Skip to content

Instantly share code, notes, and snippets.

@dhable
dhable / promise.js
Last active December 31, 2015 18:38
A quick promise implementation in JS to showcase how simple it is to implement a promise. Don't use in a production app!
function promise() {
var listeners = [],
resolved = false,
data;
return {
isResolved: function() {
return resolved;
},
@mbostock
mbostock / .block
Last active March 29, 2023 23:39
Collapsible Indented Tree
license: gpl-3.0
redirect: https://observablehq.com/@d3/indented-tree