@newdash/newdash
Version:
javascript/typescript utility library
31 lines (30 loc) • 931 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.isArguments = void 0;
const getTag_1 = __importDefault(require("./.internal/getTag"));
const isObjectLike_1 = __importDefault(require("./isObjectLike"));
/**
* Checks if `value` is likely an `arguments` object.
*
* @since 5.5.0
* @category Lang
* @param value The value to check.
* @returns Returns `true` if `value` is an `arguments` object, else `false`.
* @example
*
* ```js
* isArguments(function() { return arguments }())
* // => true
*
* isArguments([1, 2, 3])
* // => false
* ```
*/
function isArguments(value) {
return (0, isObjectLike_1.default)(value) && (0, getTag_1.default)(value) == "[object Arguments]";
}
exports.isArguments = isArguments;
exports.default = isArguments;