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

52 lines
752 B

/**
*
* VALIDATE: positive-integer
*
*
* DESCRIPTION:
* - Validates if a value is a positive integer.
*
*
* NOTES:
* [1]
*
*
* TODO:
* [1]
*
*
* LICENSE:
* MIT
*
* Copyright (c) 2015. Athan Reines.
*
*
* AUTHOR:
* Athan Reines. kgryte@gmail.com. 2015.
*
*/
'use strict';
// MODULES //
var isInteger = require( 'validate.io-integer' );
// IS POSITIVE INTEGER //
/**
* FUNCTION: isPositiveInteger( value )
* Validates if a value is a positive integer.
*
* @param {*} value - value to be validated
* @returns {Boolean} boolean indicating if a value is a positive integer
*/
function isPositiveInteger( value ) {
return isInteger( value ) && value > 0;
} // end FUNCTION isPositiveInteger()
// EXPORTS //
module.exports = isPositiveInteger;