@mapcss/preset-svg
Version:
SVG as CSS for MapCSS
19 lines (18 loc) • 379 B
JavaScript
/**
* Whatever argument is empty array or not
* @param value - Any array
* @returns The result of `!!value.length`
*
* @example
* ```ts
* import { isEmptyArray } from './mod.ts'
* isEmptyArray([]) // true
* isEmptyArray(['test']) // false
* ```
*
* @beta
*/
function isEmptyArray(value) {
return Array.isArray(value) && !value.length;
}
export { isEmptyArray };