'use strict';

var NS = {};


// MODULES //

var getKeys = require( 'object-keys' ).shim();
NS.RE_EOL = require( '@stdlib/regexp/eol' );
NS.RE_EXTNAME = require( '@stdlib/regexp/extname' );
NS.RE_EXTNAME_POSIX = require( '@stdlib/regexp/extname-posix' );
NS.RE_EXTNAME_WINDOWS = require( '@stdlib/regexp/extname-windows' );
NS.RE_FUNCTION_NAME = require( '@stdlib/regexp/function-name' );


// VARIABLES //

var KEYS = getKeys( NS );


// BIND //

/**
* Binds functions to a REPL namespace.
*
* @private
* @param {Object} ns - namespace
* @returns {Object} input namespace
*
* @example
* var ns = {};
* bind( ns );
* // returns <input_namespace>
*/
function bind( ns ) {
	var key;
	var i;
	for ( i = 0; i < KEYS.length; i++ ) {
		key = KEYS[ i ];
		ns[ key ] = NS[ key ];
	}
	return ns;
} // end FUNCTION bind()


// EXPORTS //

module.exports = bind;

'use strict';

var NS = {};


// MODULES //

var getKeys = require( 'object-keys' ).shim();
NS.RE_EOL = require( '@stdlib/regexp/eol' );
NS.RE_DIRNAME = require( '@stdlib/regexp/dirname' );
NS.RE_DIRNAME_POSIX = require( '@stdlib/regexp/dirname-posix' );
NS.RE_DIRNAME_WINDOWS = require( '@stdlib/regexp/dirname-windows' );
NS.RE_EXTNAME = require( '@stdlib/regexp/extname' );
NS.RE_EXTNAME_POSIX = require( '@stdlib/regexp/extname-posix' );
NS.RE_EXTNAME_WINDOWS = require( '@stdlib/regexp/extname-windows' );
NS.RE_FUNCTION_NAME = require( '@stdlib/regexp/function-name' );


// VARIABLES //

var KEYS = getKeys( NS );


// BIND //

/**
* Binds functions to a REPL namespace.
*
* @private
* @param {Object} ns - namespace
* @returns {Object} input namespace
*
* @example
* var ns = {};
* bind( ns );
* // returns <input_namespace>
*/
function bind( ns ) {
	var key;
	var i;
	for ( i = 0; i < KEYS.length; i++ ) {
		key = KEYS[ i ];
		ns[ key ] = NS[ key ];
	}
	return ns;
} // end FUNCTION bind()


// EXPORTS //

module.exports = bind;

Add dirname RegExps to REPL context
Add dirname RegExps to REPL context
