export function isDef(v) { return v !== undefined && v !== null; } /** * Remove an item from an array. */ export function remove(arr, item) { if (arr.length) { const index = arr.indexOf(item); if (index > -1) { return arr.splice(index, 1); } } } export function isRegExp(v) {
return _toString.call(v) === '[object RegExp]';
} const _toString = Object.prototype.toString;