function attacher( options ) {
	var opts = copy( defaults );

	// NOTE: cannot use `arguments.length` check, as `options` may be explicitly passed as `undefined`
	if ( options !== void 0 ) {
		if ( !isObject( options ) ) {
			throw new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );
		}
		if ( hasOwnProp( options, 'dir' ) ) {
			if ( !isString( options.dir ) ) {
				throw new TypeError( format( 'invalid option. `%s` option must be a string. Option: `%s`.', 'dir', options.dir ) );
			}
			opts.dir = options.dir;
		}
		if ( hasOwnProp( options, 'prefix' ) ) {
			if ( !isString( options.prefix ) ) {
				throw new TypeError( format( 'invalid option. `%s` option must be a string. Option: `%s`.', 'prefix', options.prefix ) );
			}
			opts.prefix = options.prefix;
		}
	}
	debug( 'Attaching a plugin configured with the following options: %s', JSON.stringify( opts ) );
	return transformerFactory( opts );
}
Attaches a plugin to a remark processor in order to insert source URLs for equation images into Markdown equation elements.

@param {Options} [options] - plugin options
@param {string} [options.dir="./docs/img/"] - resource directory
@param {string} [options.prefix="equation_"] - filename prefix
@throws {TypeError} options argument must be an object
@throws {TypeError} must provide valid options
@returns {Function} transformer