- Underscore.JS Tutorial
- Underscore.JS - Home
- Underscore.JS - Overview
- Underscore.JS - Environment Setup
- Underscore.JS - Iterating Collection
- Underscore.JS - Processing Collection
- Underscore.JS - Iterating Array
- Underscore.JS - Processing Array
- Underscore.JS - Functions
- Underscore.JS - Mapping Objects
- Underscore.JS - Updating Objects
- Underscore.JS - Comparing Objects
- Underscore.JS - Utilities
- Underscore.JS - Chaining
- Underscore.JS Useful Resources
- Underscore.JS - Quick Guide
- Underscore.JS - Useful Resources
- Underscore.JS - Discussion
Underscore.JS - Comparing Objects
Underscore.JS has many easy to use methods which helps in comparing objects. This chapter discusses them in detail.
Underscore.JS provides various methods to handle object comparison as listed below −
Sr.No. | Method & Syntax |
---|---|
1 | matcher
_.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) |
Advertisements