<commit_before>'use strict';

/**
* Regular expression to capture a filename extension.
*
* @module @stdlib/regexp/extname
* @type {RegExp}
*
* @example
* var RE_EXTNAME = require( '@stdlib/regexp/extname' );
*
* // On a POSIX platform...
* var ext = RE_EXTNAME.exec( '/foo/bar/index.js' )[ 1 ];
* // returns '.js'
*
* @example
* var RE_EXTNAME = require( '@stlib/regexp/extname' );
*
* // On a Windows platform...
* var ext = RE_EXTNAME.exec( 'C:\\foo\\bar\\index.js' )[ 1 ];
* // returns '.js'
*/

// MODULES //

var copy = require( '@stdlib/utils/copy' );
var isWindows = require( '@stdlib/utils/is-windows' );


// MAIN //

var posix = require( '@stdlib/regexp/extname-posix' );
var win32 = require( '@stdlib/regexp/extname-windows' );

var re;
if ( isWindows ) {
	re = win32;
} else {
	re = posix;
}
re = copy( re );


// EXPORTS //

module.exports = re;
module.exports.posix = posix;
module.exports.win32 = win32;<commit_msg>Set read only properties<commit_after>'use strict';

/**
* Regular expression to capture a filename extension.
*
* @module @stdlib/regexp/extname
* @type {RegExp}
*
* @example
* var RE_EXTNAME = require( '@stdlib/regexp/extname' );
*
* // On a POSIX platform...
* var ext = RE_EXTNAME.exec( '/foo/bar/index.js' )[ 1 ];
* // returns '.js'
*
* @example
* var RE_EXTNAME = require( '@stlib/regexp/extname' );
*
* // On a Windows platform...
* var ext = RE_EXTNAME.exec( 'C:\\foo\\bar\\index.js' )[ 1 ];
* // returns '.js'
*/

// MODULES //

var setReadOnly = require( '@stdlib/utils/define-read-only-property' );
var copy = require( '@stdlib/utils/copy' );
var IS_WINDOWS = require( '@stdlib/utils/is-windows' );


// MAIN //

var posix = require( '@stdlib/regexp/extname-posix' );
var win32 = require( '@stdlib/regexp/extname-windows' );

var RE_EXTNAME;
if ( IS_WINDOWS ) {
	RE_EXTNAME = win32;
} else {
	RE_EXTNAME = posix;
}
RE_EXTNAME = copy( RE_EXTNAME );

setReadOnly( RE_EXTNAME, 'posix', posix );
setReadOnly( RE_EXTNAME, 'win32', win32 );


// EXPORTS //

module.exports = RE_EXTNAME;
{'fraction_non_alphanumeric': 0.19090009891196835, 'fraction_numerical': 0.009891196834817012, 'mean_word_length': 3.43640350877193, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6266576', 'n_tokens_mistral': 785, 'n_tokens_neox': 759, 'n_words': 174}