How to use the array function from is
Find comprehensive JavaScript is.array code examples handpicked from public code repositorys.
GitHub: dreamerslab/node.extend
79 80 81 82 83 84 85 86 87 88
if (target === copy) { continue; } // Recurse if we're merging plain objects or arrays if (deep && copy && (is.hash(copy) || (copyIsArray = is.array(copy)))) { if (copyIsArray) { copyIsArray = false; clone = src && is.array(src) ? src : []; } else {
21
128
12
+ 3 other calls in file
GitHub: trytonus/nereid-webshop
49 50 51 52 53 54 55 56 57 58
if (target === copy) { continue; } // Recurse if we're merging plain objects or arrays if (deep && copy && (is.hash(copy) || (copy_is_array = is.array(copy)))) { if (copy_is_array) { copy_is_array = false; clone = src && is.array(src) ? src : []; } else {
12
3
5
+ 15 other calls in file
22 23 24 25 26 27 28 29 30 31
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; var isFunction = is.function; function Fuzzer() { }
557
0
3
GitHub: alibaba/beidou
16 17 18 19 20 21 22 23 24 25
let pathArr = [ filepath, path.join(option.view || this.app.baseDir, filepath) ]; if (is.function(this.remoteAsset)) { pathArr.push(await this.remoteAsset(filepath)); } if (option.extensions && is.array(option.extensions)) { const pathArrExt = []; pathArr.forEach(v => { option.extensions.forEach(
275
0
97
+ 3 other calls in file
GitHub: caolan/forms
175 176 177 178 179 180 181 182 183
var f = exports.string(opts); f.parse = function (raw_data) { if (typeof raw_data === 'undefined') { return []; } return is.array(raw_data) ? raw_data : [raw_data]; }; return f; };
170
0
29
+ 27 other calls in file
GitHub: sarunyou/gstore-node
125 126 127 128 129 130 131 132 133 134
} // Private // ------- function createKey(self, id, ancestors, namespace) { const hasAncestors = typeof ancestors !== 'undefined' && ancestors !== null && is.array(ancestors); /* /* Create copy of ancestors to avoid mutating the Array */
49
0
1
60 61 62 63 64 65 66 67 68 69
* @private * @hideconstructor * @param {...string|string[]} segments - Sequence of parts of a path. */ constructor(segments) { segments = is.array(segments) ? segments : Array.prototype.slice.call(arguments); /**
151
0
2
+ 3 other calls in file
58 59 60 61 62 63 64 65 66 67
case 'datetime': valid = isValidDate(value); ref = 'datetime.base'; break; case 'array': valid = is.array(value); ref = 'array.base'; break; case 'number': case 'int': {
50
0
1
GitHub: jiangxueyang/serverTest
50 51 52 53 54 55 56 57 58 59
filter(params, filterArr) { if (IS.object(params) && IS.array(filterArr)) { let data = {}; filterArr.forEach(e => { let val = params[e]; if (!IS.undefined(val) && !IS.null(val) && !IS.empty(val) || IS.array.empty(val)) { data[e] = val; } }); return data;
25
50
2
+ 3 other calls in file
GitHub: euank/node-oiio
30 31 32 33 34 35 36 37 38 39
} 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]); } } else if(args.length == 1 && is.array(args[0])) { this.channels = slice(args[0]); } else { console.log(args); throw new TypeError("Argument type unsupported for now");
0
6
3
+ 3 other calls in file