code: function resolve(parent, id) {
  	if (/^\.\.?\//.test(id) && parent) { // is a relative id
  		id = parent.replace(/[^\/]+$/, id); // prepend parent's dirname
  	}
  	var terms = [];
  	id.split('/').forEach(function(term) {
  		if ('..' === term) { terms.pop(); } // remove previous, don't add ..
  		else if ('.' !== term) { terms.push(term); } // add term
  		// else if ('.' === term) // ignore .
  	});
  	return terms.join('/');
  }
docs: Turn a relative id to absolute given a parent id