Skip to content

Instantly share code, notes, and snippets.

@barcicki
barcicki / test.js
Created March 19, 2017 20:57
Call order test
function test(name, depths = 1) {
console.log(name);
if (depths > 0) {
setImmediate(() => test(`${name} > setImmediate`, depths - 1));
setTimeout(() => test(`${name} > setTimeout`, depths - 1));
process.nextTick(() => test(`${name} > nextTick`, depths - 1));
Promise.resolve().then(() => test(`${name} > resolve`, depths - 1));
}
}
@barcicki
barcicki / README.md
Last active November 16, 2016 19:12
getBBox() for different SVG elements with the same viewBox

getBBox() results calculated for multiple SVG elements with same viewBox but with different width and height. Aspect remains the same.