Skip to content

Instantly share code, notes, and snippets.

View robertpitt's full-sized avatar

Robert Pitt robertpitt

View GitHub Profile
@robertpitt
robertpitt / data-example.json
Created October 17, 2019 17:23 — forked from swayvil/data-example.json
D3.js collapsing tree with boxes
{
"tree" : {
"nodeName" : "NODE NAME 1",
"name" : "NODE NAME 1",
"type" : "type3",
"code" : "N1",
"label" : "Node name 1",
"version" : "v1.0",
"link" : {
"name" : "Link NODE NAME 1",
@robertpitt
robertpitt / jsondiff.js
Created September 10, 2013 17:25 — forked from bruth/jsondiff.js
var jsondiff = (function() {
// Patch helper functions
function getParent(paths, path) {
return paths[path.substr(0, path.match(/\//g).length)];
}
// Checks if `obj` is an array or object
function isContainer(obj) {
return _.isArray(obj) || _.isObject(obj);