A suite to track Project Diva score statistics and ratings / D4DJ event data.

46 lines
656 B

/**
*
* VALIDATE: number-primitive
*
*
* DESCRIPTION:
* - Validates if a value is a number primitive.
*
*
* NOTES:
* [1]
*
*
* TODO:
* [1]
*
*
* LICENSE:
* MIT
*
* Copyright (c) 2015. Athan Reines.
*
*
* AUTHOR:
* Athan Reines. kgryte@gmail.com. 2015.
*
*/
'use strict';
/**
* FUNCTION: isNumber( value )
* Validates if a value is a number primitive, excluding `NaN`.
*
* @param {*} value - value to be validated
* @returns {Boolean} boolean indicating if a value is a number primitive
*/
function isNumber( value ) {
return (typeof value === 'number') && (value === value);
} // end FUNCTION isNumber()
// EXPORTS //
module.exports = isNumber;