How to use the number function from is
Find comprehensive JavaScript is.number code examples handpicked from public code repositorys.
19 20 21 22 23 24 25 26 27 28var indexOf = require('lodash.indexof'); var without = require('lodash.without'); var maxBy = require('lodash.maxby'); var random = require('lodash.random'); var is = require('is'); var isNumber = is.number; var isObject = is.object; var isString = is.string; var isArray = is.array; var isNull = is.null;
GitHub: alibaba/beidou

138 139 140 141 142 143 144 145 146 147if (!filter) { return keyData; } if (is.function(filter)) { return filter(keyData); } else if (is.string(filter) || is.number(filter)) { return keyData[filter]; } else { return null; }
+ 19 other calls in file
17 18 19 20 21 22 23 24 25 26Hotjar.prototype.initialize = function() { // Make sure our metadata inputs are valid, putting out a console error and aborting if not. function areOptionsValid(options) { var validators = { isHjidValid: is.number(options.hjid) && !is.nan(options.hjid) && options.hjid !== 0, // Make sure that HJID is a number (and isn't NaN) isPlaceholderPolyfillValid: is.bool(options.hjPlaceholderPolyfill) // Make sure we received a boolean. }; for (var validator in validators) {
+ 5 other calls in file
GitHub: euank/node-oiio

25 26 27 28 29 30 31 32 33 34this.channels = slice(args[0].channels); } else if(args.length == 1 && Buffer.isBuffer(args[0])) { for(i=0;i<args[0].length;i++) { this.channels.push(args[0][i]); } } else if((args.length == 1 || args.length == 3 || args.length == 4) && is.number(args[0])) { for(i=0;i<args.length;i++) { if(!is.number(args[i])) throw new TypeError("Invalid argument type. Expected all to be numbers."); this.channels.push(args[i]); }
+ 3 other calls in file

