'use strict';

/**
* Node version.
*
* @module @stdlib/process/node-version
* @type {(string|null)}
*
* @example
* var semver = require( 'semver' );
* var VERSION = require( '@stdlib/process/node-version' );
*
* if ( semver.lt( VERSION, '1.0.0' ) ) {
*    console.log( 'Running on a pre-io.js version...' );
* }
* else if ( semver.lt( VERSION, '4.0.0' ) ) {
*    console.log( 'Running on an io.js version...' );
* }
* else {
*    console.log( 'Running on a post-io.js version...' );
* }
*/

// MODULES //

var IS_NODE = require( '@stdlib/assert/is-node' );


// MAIN //

var VERSION;
if ( IS_NODE ) {
	VERSION = require( './version.js' );
} else {
	VERSION = require( './browser.js' );
}


// EXPORTS //

module.exports = VERSION;

'use strict';

/**
* Node version.
*
* @module @stdlib/process/node-version
* @type {(string|null)}
*
* @example
* var semver = require( 'semver' );
* var VERSION = require( '@stdlib/process/node-version' );
*
* if ( semver.lt( VERSION, '1.0.0' ) ) {
*    console.log( 'Running on a pre-io.js version...' );
* }
* else if ( semver.lt( VERSION, '4.0.0' ) ) {
*    console.log( 'Running on an io.js version...' );
* }
* else {
*    console.log( 'Running on a post-io.js version...' );
* }
*/

// MODULES //

var IS_NODE = require( '@stdlib/assert/is-node' );
var node = require( './version.js' );
var browser = require( './browser.js' );


// MAIN //

var VERSION;
if ( IS_NODE ) {
	VERSION = node;
} else {
	VERSION = browser;
}


// EXPORTS //

module.exports = VERSION;

Refactor to avoid dynamic module resolution
Refactor to avoid dynamic module resolution
