![]() The chain ends with a call to the value() method which simply returns the resulting array value. The chain() method returns an object that has all of the Underscore array operations attached as methods which return that object. Chaining is common idiom on object-oriented languages.Ī chain is a sequence of method calls on the same objects that are performed is a single statement. invert(): create object in which the values are keys and the attributes are valuesĪnother great feature in Backbone is its support for Underscore’s chain() method. ![]() pairs(): get list of attributes as pairs.keys(), values(): get list of attribute names and values.omit(): extract all attributes from a model except those listed. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |