function pkgDeps( pkgs, options, clbk ) {
	var results;
	var entries;
	var opts;
	var err;
	var cb;
	if ( !isStringArray( pkgs ) ) {
		throw new TypeError( format( 'invalid argument. First argument must be an array of strings. Value: `%s`.', pkgs ) );
	}
	opts = copy( defaults );
	if ( arguments.length < 3 ) {
		cb = options;
	} else {
		cb = clbk;
		err = validate( opts, options );
		if ( err ) {
			throw err;
		}
	}
	if ( !isFunction( cb ) ) {
		throw new TypeError( format( 'invalid argument. Callback argument must be a function. Value: `%s`.', cb ) );
	}
	debug( 'Options: %s', JSON.stringify( opts ) );
	if ( opts.dir ) {
		opts.dir = path.resolve( cwd(), opts.dir );
	} else {
		opts.dir = cwd();
	}
	debug( 'Base directory: %s', opts.dir );

	debug( 'Resolving browser entry points...' );
	entryPoints( pkgs, opts, onEntries );

	/**
	* Callback invoked upon resolving package entry points.
	*
	* @private
	* @param {(Error|null)} error - error object
	* @param {ObjectArray} res - entry points
	* @returns {void}
	*/
	function onEntries( error, res ) {
		if ( error ) {
			debug( 'Encountered an error when resolving package browser entry points: %s', error.message );
			return done( error );
		}
		debug( 'Successfully resolved package browser entry points.' );

		entries = res;
		results = initResults( entries );

		debug( 'Resolving package aliases...' );
		resolveAliases( results, entries, onAliases );
	}

	/**
	* Callback invoked upon resolving package aliases.
	*
	* @private
	* @param {(Error|null)} error - error object
	* @param {ObjectArray} results - results
	* @returns {void}
	*/
	function onAliases( error ) {
		if ( error ) {
			debug( 'Encountered an error when resolving package aliases: %s', error.message );
			return done( error );
		}
		debug( 'Successfully resolved package aliases.' );

		debug( 'Resolving package dependencies...' );
		resolveDeps( results, entries, opts.builtins, onDeps );
	}

	/**
	* Callback invoked upon resolving package dependencies.
	*
	* @private
	* @param {(Error|null)} error - error object
	* @param {ObjectArray} results - results
	* @returns {void}
	*/
	function onDeps( error ) {
		if ( error ) {
			debug( 'Encountered an error when resolving package dependencies: %s', error.message );
			return done( error );
		}
		debug( 'Successfully resolved package dependencies.' );
		if ( opts.dev === false ) {
			return done();
		}
		debug( 'Resolving package dev dependencies...' );
		resolveDevDeps( results, opts, onDevDeps );
	}

	/**
	* Callback invoked upon resolving package dev dependencies.
	*
	* @private
	* @param {(Error|null)} error - error object
	* @param {ObjectArray} results - results
	* @returns {void}
	*/
	function onDevDeps( error ) {
		if ( error ) {
			debug( 'Encountered an error when resolving package dev dependencies: %s', error.message );
			return done( error );
		}
		debug( 'Successfully resolved package dev dependencies.' );
		done();
	}

	/**
	* Callback invoked upon completion.
	*
	* @private
	* @param {(Error|null)} error - error object
	* @returns {void}
	*/
	function done( error ) {
		if ( error ) {
			return cb( error );
		}
		cb( null, results );
	}
}
Asynchronously resolves package dependencies for use in a browser.

@param {StringArray} pkgs - list of packages
@param {Options} [options] - function options
@param {string} [options.dir] - root directory from which to resolve packages
@param {boolean} [options.builtins=false] - boolean indicating whether to include built-in packages
@param {boolean} [options.dev=false] - boolean indicating whether to resolve dev dependencies
@param {Callback} clbk - callback to invoke after resolving dependencies
@throws {TypeError} first argument must be an array of strings
@throws {TypeError} callback argument must be a function
@throws {TypeError} options argument must be an object
@throws {TypeError} must provide valid options

@example
var pkgs = [ '/foo/bar/baz' ];

function clbk( error, results ) {
    if ( error ) {
        return console.error( error.message );
    }
    console.dir( results );
}

pkgDeps( pkgs, clbk );