Skip to content

Instantly share code, notes, and snippets.

View andymerskin's full-sized avatar
Wizarding

Andy Merskin andymerskin

Wizarding
View GitHub Profile
@andymerskin
andymerskin / recursive_parents.js
Last active June 14, 2024 02:56
Recursively add parent objects to each child (lodash)
import _ from 'lodash';
/*
* Description:
* Add `.parent` property (with reference to parent object)
* to each array item recursively.
*
* INPUT:
*
* parents []
<div class="wrapper">
<div class="grid">
<div class="grid__cell grid__cell--content">
<h1>
Hello world.
</h1>
<div class="grid">
<div class="grid__cell grid__cell--inner">
<h2>
Hello world.
@andymerskin
andymerskin / dabblet.css
Created July 18, 2012 21:07
Darkport Buttons CSS
body {
background: #222;
}
#main {
margin: 10%;
}