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

	opts = copy( config );
	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 ) );
	}
	gopts = {
		'cwd': getRoot( opts.dir || '' ),
		'ignore': opts.ignore.concat( config.ignore ), // always include default ignore patterns
		'realpath': true // return absolute file paths
	};
	glob( opts.pattern, gopts, onGlob );

	/**
	* Callback invoked after matching files.
	*
	* @private
	* @param {(Error|null)} error - error object
	* @param {StringArray} names - list of matching files
	* @returns {void}
	*/
	function onGlob( error, names ) {
		if ( error ) {
			return clbk( error );
		}
		clbk( null, transform( names ) );
	}
}
Asynchronously generates a list of stdlib package names.

@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 );
}