UNPKG

bape

Version:
32 lines (29 loc) 791 B
(function (global, factory) { if (typeof define === "function" && define.amd) { define(["exports"], factory); } else if (typeof exports !== "undefined") { factory(exports); } else { var mod = { exports: {} }; factory(mod.exports); global.isEmptyArray = mod.exports; } })(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports) { "use strict"; Object.defineProperty(_exports, "__esModule", { value: true }); _exports["default"] = isEmptyArray; /** * Determine whether input is an empty array * * @param {*} input */ function isEmptyArray(input) { if (!Array.isArray(input)) return true; return input.length === 0; } module.exports = exports.default; });