(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
if (!("classList" in SVGElement.prototype)) { | |
Object.defineProperty(SVGElement.prototype, "classList", { | |
get() { | |
return { | |
contains: className => { | |
return this.className.baseVal.split(" ").indexOf(className) !== -1; | |
}, | |
add: className => { | |
return this.setAttribute('class', this.getAttribute('class') + ' ' + className); | |
}, |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
# delete local tag '12345' | |
git tag -d 12345 | |
# delete remote tag '12345' (eg, GitHub version too) | |
git push origin :refs/tags/12345 | |
# alternative approach | |
git push --delete origin tagName | |
git tag -d tagName |
/** | |
* Sort array of objects based on another array | |
*/ | |
function mapOrder (array, order, key) { | |
array.sort( function (a, b) { | |
var A = a[key], B = b[key]; | |