_.invoke

invoke_.invoke(list, methodName, *arguments)
Calls the method named by methodName on each value in the list. Any extra arguments passed to invoke will be forwarded on to the method invocation.

_.invoke([[5, 1, 7], [3, 2, 1]], 'sort');
=> [[1, 5, 7], [1, 2, 3]]
doc_Underscore
2016-04-09 09:05:25
Comments
Leave a Comment

Please login to continue.