Skip to content

Instantly share code, notes, and snippets.


Josh Lloyd corse32

View GitHub Profile
View gist:2fbd988ff37226c40131cab00e3bf779

##Quick changelog git log staging..HEAD --no-merges --pretty=format:%s

corse32 / zip.js
Created Mar 23, 2018
Variable Arity Array Zip
View zip.js
function zip() {
const [arr1,] = arguments
return, i) => [e,, arrN) => [...accum, arrN[i]], [])])
corse32 / dump-styles.js
Created Dec 13, 2017
JS (ES 6) one liner for extracting CSS rules from a DOM element
View dump-styles.js
//blah is a reference to the dom node in question, e.g. const blah = document.getElementById('popover882889')
Array.from(window.getMatchedCSSRules(blah)).reduce((acc, rule) => `${acc} \n ${rule.cssText}`)