English 中文(简体)
Underscore.JS - Mapping Objects
  • 时间:2024-12-22

Underscore.JS - Mapping Objects


Previous Page Next Page  

Underscore.JS has many easy to use methods which helps in mapping objects. This chapter discusses them in detail.

Underscore.JS provides various methods to handle object mapping as psted below −

Sr.No. Method & Syntax
1 keys

_.keys(object)

2 allKeys

_.allKeys(object)

3 values

_.values(object)

4 mapObject

_.mapObject(object, iteratee, [context])

5 pairs

_.pairs(object)

6 invert

_.invert(object)

7 create

_.create(prototype, props)

8 functions

_.functions(object)

9 findKey

_.findKey(object, predicate, [context])

Advertisements