- Underscore.JS 教程
- Underscore.JS - 首页
- Underscore.JS - 概述
- Underscore.JS - 环境设置
- Underscore.JS - 集合迭代
- Underscore.JS - 集合处理
- Underscore.JS - 数组迭代
- Underscore.JS - 数组处理
- Underscore.JS - 函数
- Underscore.JS - 对象映射
- Underscore.JS - 对象更新
- Underscore.JS - 对象比较
- Underscore.JS - 工具函数
- Underscore.JS - 链式调用
- Underscore.JS 有用资源
- Underscore.JS - 快速指南
- Underscore.JS - 有用资源
- Underscore.JS - 讨论
Underscore.JS - 对象比较
Underscore.JS 提供了许多易于使用的用于比较对象的方法。本章将详细讨论这些方法。
Underscore.JS 提供了多种处理对象比较的方法,如下所示:
| 序号 | 方法及语法 |
|---|---|
| 1 | 匹配器
_.matcher(attrs) |
| 2 | isEqual
_.isEqual(object, other) |
| 3 | isMatch
_.isMatch(object, properties) |
| 4 | isEmpty
_.isEmpty(object) |
| 5 | isArray
_.isArray(object) |
| 6 | isObject
_.isObject(value) |
| 7 | isArguments
_.isArguments(object) |
| 8 | isFunction
_.isFunction(object) |
| 9 | isString
_.isString(object) |
| 10 | isNumber
_.isNumber(object) |
| 11 | isFinite
_.isFinite(object) |
| 12 | isBoolean
_.isBoolean(object) |
| 13 | isDate
_.isDate(object) |
| 14 | isRegExp
_.isRegExp(object) |
| 15 | isError
_.isError(object) |
| 16 | isSymbol
_.isSymbol(object) |
| 17 | isMap
_.isMap(object) |
| 18 | isWeakMap
_.isWeakMap(object) |
| 19 | isSet
_.isSet(object) |
| 20 | isWeakSet
_.isWeakSet(object) |
| 21 | isNaN
_.isNaN(object) |
| 22 | isNull
_.isNull(object) |
| 23 | isUndefined
_.isUndefined(value) |
广告