This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/yay | |
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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()]; | |
} |