haw-utils
Version:
一个基于业务场景的工具方法库
43 lines (42 loc) • 1.23 kB
JavaScript
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define(["exports", "./isType"], factory);
} else if (typeof exports !== "undefined") {
factory(exports, require("./isType"));
} else {
var mod = {
exports: {}
};
factory(mod.exports, global.isType);
global.isArguments = mod.exports;
}
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, _isType) {
"use strict";
Object.defineProperty(_exports, "__esModule", {
value: true
});
_exports["default"] = void 0;
_isType = _interopRequireDefault(_isType);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
* 检查值是否为Arguments
*
* @static
* @alias module:Type.isArguments
* @since 1.1.0
* @param {*} value 检查值
* @returns {Boolean} 是否为Arguments
* @example
*
* isArguments(function() { return arguments }())
* // => true
*
* isArguments([1, 2, 3])
* // => false
*/
function isArguments(value) {
return (0, _isType["default"])(value, 'Arguments');
}
var _default = isArguments;
_exports["default"] = _default;
});