function ls() {
	var options;
	var clbk;
	var opts;
	var err;

	opts = copy( defaults );
	if ( arguments.length < 2 ) {
		clbk = arguments[ 0 ];
	} else {
		options = arguments[ 0 ];
		clbk = arguments[ 1 ];
		err = validate( opts, options );
		if ( err ) {
			throw err;
		}
	}
	if ( !isFunction( clbk ) ) {
		throw new TypeError( format( 'invalid argument. Callback argument must be a function. Value: `%s`.', clbk ) );
	}
	pkgNames( opts, onPkgs );

	/**
	* Callback invoked after resolving packages.
	*
	* @private
	* @param {(Error|null)} error - error object
	* @param {(StringArray|EmptyArray)} names - list of package names
	* @returns {void}
	*/
	function onPkgs( error, names ) {
		if ( error ) {
			return clbk( error );
		}
		// TODO: use asynchronous sort function!
		names = sort( names );
		if ( names instanceof Error ) {
			return clbk( names );
		}
		clbk( null, names );
	}
}
Asynchronously topological sorts stdlib packages.

@param {Options} [options] - function options
@param {string} [options.dir] - directory from which to search for packages
@param {string} [options.pattern='**\/package.json'] - glob pattern
@param {StringArray} [options.ignore] - glob pattern(s) to exclude matches
@param {Callback} clbk - callback to invoke after finding packages
@throws {TypeError} callback argument must be a function
@throws {TypeError} options argument must be an object
@throws {TypeError} must provide valid options
@throws {Error} `pattern` option must end with `package.json`

@example
ls( onList );

function onList( error, names ) {
    if ( error ) {
        throw error;
    }
    console.dir( names );
}