Learn more  » Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

skava / exotic   js

Repository URL to install this package:

Version: 2.0.8 

/ src / types / @omni / presets / isNotEmptyArray.ts

import isArray from '../../array/check/isArray'

/**
 * @desc value is an Array, with at least 1 value
 * @param  {*} x value
 * @return {boolean} isNotEmptyArray
 *
 * @since 4.0.0-alpha.1
 * @memberOf is
 * @func isNotEmptyArray
 *
 * @extends isArray
 * @variation && array.length !== 0
 * @see is/objWithKeys
 * @see is/array
 *
 * @example
 *  isNotEmptyArray(new Array(3))
 *  //=> true
 *  isNotEmptyArray([1, 2, 3])
 *  //=> true
 *
 *  isNotEmptyArray(new Array())
 *  //=> false
 *  isNotEmptyArray([])
 *  //=> false
 *  isNotEmptyArray(new Map())
 *  //=> false
 */
const isNotEmptyArray = x => isArray(x) && x.length !== 0

export { isNotEmptyArray as isNonEmptyArray }
export { isNotEmptyArray }
export default isNotEmptyArray