Skip to content

Instantly share code, notes, and snippets.

Avatar

Petulant Slacker LuiSlacker

View GitHub Profile
@yonester
yonester / example.js
Last active Nov 4, 2016
Can we interpolate "transform" in jsdom?
View example.js
var jsdom = require('jsdom'),
d3 = require('d3');
var document = jsdom.jsdom();
var rect = d3.select(document.body).append('svg').append('rect');
// This works...
rect
.attr('width', 0)
@justmoon
justmoon / custom-error.js
Last active Feb 6, 2021 — forked from subfuzion/error.md
Creating custom Error classes in Node.js
View custom-error.js
'use strict';
module.exports = function CustomError(message, extra) {
Error.captureStackTrace(this, this.constructor);
this.name = this.constructor.name;
this.message = message;
this.extra = extra;
};
require('util').inherits(module.exports, Error);
@staltz
staltz / introrx.md
Last active May 16, 2021
The introduction to Reactive Programming you've been missing
View introrx.md