npm-extension.js
function(loader, name){
		var pkg = utils.pkg.findByName(loader, name.split("/")[0]);
		if(pkg) {
			var parsed = utils.moduleName.parse(name, pkg.name);
			parsed.version = pkg.version;
			if(!parsed.modulePath) {
				parsed.modulePath = utils.pkg.main(pkg);
			}
			return utils.moduleName.create(parsed);
		}
		return name;
	}
function(loader, name){
		var pkg = utils.pkg.findByName(loader, name.split("/")[0]);
		if(pkg) {
			var parsed = utils.moduleName.parse(name, pkg.name);
			parsed.version = pkg.version;
			if(!parsed.modulePath) {
				parsed.modulePath = utils.pkg.main(pkg);
			}
			return utils.moduleName.create(parsed);
		}
		return name;
	}
function ( loader , name ) { var pkg = utils . pkg . findByName ( loader , name . split ( "/" ) [ 0 ] ) ; if ( pkg ) { var parsed = utils . moduleName . parse ( name , pkg . name ) ; parsed . version = pkg . version ; if ( ! parsed . modulePath ) { parsed . modulePath = utils . pkg . main ( pkg ) ; } return utils . moduleName . create ( parsed ) ; } return name ; }
Given a moduleName convert it into a npm-style moduleName if it belongs to a package.
Given a moduleName convert it into a npm - style moduleName if it belongs to a package .