lib/HalDependencyResolver.js
function(describe, fileBuffer) {
		if (describe && !util.isArray(describe) && describe.m) {
			// those goofs, they sent the whole thing, instead of just the
			// modules section.
			describe = describe.m;
		}

		if (!Buffer.isBuffer(fileBuffer)) {
			return when.reject('fileBuffer was invalid');
		}

		var parser = new HalModuleParser();
		var fileInfo = {
			filename: 'user-file',
			fileBuffer: fileBuffer
		};

		var that = this;
		return pipeline([
			function() {
				return parser.parseBuffer(fileInfo);
			},
			function() {
				return that.resolveDependencies(describe, fileInfo);
			}
		]);
	}
function(describe, fileBuffer) {
		if (describe && !util.isArray(describe) && describe.m) {
			// those goofs, they sent the whole thing, instead of just the
			// modules section.
			describe = describe.m;
		}

		if (!Buffer.isBuffer(fileBuffer)) {
			return when.reject('fileBuffer was invalid');
		}

		var parser = new HalModuleParser();
		var fileInfo = {
			filename: 'user-file',
			fileBuffer: fileBuffer
		};

		var that = this;
		return pipeline([
			function() {
				return parser.parseBuffer(fileInfo);
			},
			function() {
				return that.resolveDependencies(describe, fileInfo);
			}
		]);
	}
/*
expects a fileBuffer and the JSON describe payload for the 'm'
modules array

@param Object describe
@param Buffer fileBuffer
@returns Promise