'use strict';

// MODULES //

var debug = require( 'debug' )( 'rug:accessor:is-defined' );
var isnan = require( '@stdlib/assert/is-nan' ).isPrimitive;


// MAIN //

/**
* Accessor function which determines whether a datum is defined.
*
* @private
* @param {number} d - datum
* @returns {boolean} boolean indicating whether a datum is defined
*/
function isDefined( d ) {
	var bool = !isnan( d );
	debug( 'Datum: %s. Defined: %s.', JSON.stringify( d ), bool );
	return bool;
} // end FUNCTION isDefined()


// EXPORTS //

module.exports = isDefined;

'use strict';

// MODULES //

var debug = require( 'debug' )( 'rug:accessor:is-defined' );
var isnan = require( '@stdlib/assert/is-nan' ).isPrimitive;


// MAIN //

/**
* Accessor function which returns a boolean indicating whether a datum is defined.
*
* @private
* @param {number} d - datum
* @returns {boolean} boolean indicating whether a datum is defined
*/
function isDefined( d ) {
	var bool = !isnan( d );
	debug( 'Datum: %s. Defined: %s.', JSON.stringify( d ), bool );
	return bool;
} // end FUNCTION isDefined()


// EXPORTS //

module.exports = isDefined;

Update description