Chain - amark/gun GitHub Wiki

If you are unfamiliar with chaining, it is an API style that allows you to zoom into a context without having to create new variables. So rather than doing...

// ugly
var page = document.getElementById("page");
var child = page.firstElementChild;
child.style.background = "blue";
child.style.color = "green";
child.addEventListener('click', function(event){
  console.log("hello world!");
}, true);

...you can just do

$('#page')
	.children()
	.first()
	.css("background", "blue")
	.css("color", "green")
	.on("click", function(event){
		console.log("hello world");
	});

As you can tell, it was popularized by jQuery.

Next up?