- 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 - Updating Objects
Underscore.JS has many easy to use methods which helps in updating objects. This chapter discusses them in detail.
Underscore.JS provides various methods to handle object updates as listed below −
Sr.No. | Method & Syntax |
---|---|
1 | extend
_.extend(destination, *sources) |
2 | pick
_.pick(object, *keys) |
3 | omit
_.omit(object, *keys) |
4 | defaults
_.defaults(object, *defaults) |
5 | clone
_.clone(object) |
6 | tap
_.tap(object, interceptor) |
7 | has
_.has(object, key) |
8 | property
_.property(path) |
9 | propertyOf
_.propertyOf(object) |
Advertisements