function resolveParentPaths( paths, options ) {
	var opts;
	var mode;
	var dir;
	var fcn;
	var err;

	if ( !isStringArray( paths ) ) {
		if ( isArrayLikeObject( paths ) && paths.length === 0 ) {
			return [];
		}
		throw new TypeError( format( 'invalid argument. First argument must be an array of strings. Value: `%s`.', paths ) );
	}
	opts = {};
	if ( arguments.length > 1 ) {
		err = validate( opts, options );
		if ( err ) {
			throw err;
		}
	}
	if ( opts.dir ) {
		dir = resolve( cwd(), opts.dir );
	} else {
		dir = cwd();
	}
	mode = opts.mode || 'all';

	fcn = MODES[ mode ];
	return fcn( paths, dir );
}
Synchronously resolves paths from a set of paths by walking parent directories.

@param {Array<string>} paths - paths to resolve
@param {Options} [options] - function options
@param {string} [options.dir] - base directory
@param {string} [options.mode='all'] - mode of operation
@throws {TypeError} first argument must be an array of strings
@throws {TypeError} options argument must be an object
@throws {TypeError} must provide valid options
@returns {Array<string|null>} resolved paths

@example
var paths = resolveParentPaths( [ 'package.json', 'package-lock.json' ] );