- 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) |
廣告