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

	opts = copy( config );
	if ( arguments.length ) {
		err = validate( opts, options );
		if ( err ) {
			throw err;
		}
	}
	gopts = {
		'cwd': getRoot( opts.dir || '' ),
		'ignore': opts.ignore.concat( config.ignore ), // always include default ignore patterns
		'realpath': true // return absolute file paths
	};
	names = glob( opts.pattern, gopts );
	return transform( names );
}
Synchronously 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
@throws {TypeError} options argument must be an object
@throws {TypeError} must provide valid options
@throws {Error} `pattern` option must end with `package.json`
@returns {StringArray} list of names

@example
var names = ls();
// returns [...]