UNPKG

is-eq-eight

Version:

Returns true if the given number is 8, false otherwise.

39 lines (30 loc) 889 B
'use strict'; module.exports = is8; const is7 = require('is-eq-seven'); const isNumber = require('is-number'); const isString = require('is-string'); const isUndefined = require('is-undefined'); const isNull = require('is-null'); global.jQuery = require('jquery'); require('jquery-basic-arithmetic-plugin'); const isTrue = require('is-true'); function is8(x) { // Check if given object is undefined if (isUndefined(x)) { return false; } // Check if given object is null if (isNull(x)) { return false; } // Check if given object is string if (isString(x)) { return false; } // Check if given object is number if (!isNumber(x)) { return false; } // Check if given number is 8 return isTrue({result: is7(jQuery.subtract(x, 1))}, 'result'); }