- 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 - Utilities
Underscore.JS has many easy to use utility methods. This chapter discusses them in detail.
Underscore.JS provides various utility methods as listed below −
Sr.No. | Method & Syntax |
---|---|
1 | identity
_.identity(value) |
2 | constant
_.constant(value) |
3 | noop
_.noop() |
4 | times
_.times(n, iteratee, [context]) |
5 | random
_.random(min, max) |
6 | mixin
_.mixin(object) |
7 | iteratee
_.iteratee(value, [context]) |
8 | uniqueId
_.uniqueId([prefix]) |
9 | escape
_.escape(string) |
10 | unescape
_.unescape(string) |
11 | result
_.result(object, property, [defaultValue]) |
12 | now
_.now() |
13 | template
_.template(templateString, [settings]) |
Advertisements
To Continue Learning Please Login
Login with Google