Skip to content

Instantly share code, notes, and snippets.

Jon jond3k

Block or report user

Report or block jond3k

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View log4x
# Highlights log4j style messages
debug and trace are @boring
info is @normal
warning is @interesting
error is @serious
fatal is @serious
# some words that aren't logger levels but are still important
jond3k / gist:1352258
Created Nov 9, 2011
Two ways to crawl objects with an array of 'directions'. re:
View gist:1352258
var obj = {a:{b:{c:':D'}}};
var path = ['a','b','c'];
var path2 = ['a','b','c'];
console.log(crawl(obj, path));
console.log(crawl2(obj, path2));
function crawl2(obj, keys) {
while(keys.length) {
obj = obj[keys.shift()];
You can’t perform that action at this time.