This PR fixes the mvc.Collection tests. The mvc.Events tests were copied to the mvc.collection.js test file by accident, so this just reverses that.
Around 14 instances of pluck were removed from the test file, and replaced with map.
collection.pluck('id') => collection.map((model) => model.get('id'))
The PR also removes the instances of Array.from from mvc.Collection.
The PR also fixes exposing extend and addMethodsUtil from mvcUtils to the user.
Description
Update
mvc.Collection
methods and relevanttypes
.Methods added:
each
filter
includes
isEmpty
map
reduce
Methods removed:
pluck
This PR fixes the
mvc.Collection
tests. Themvc.Events
tests were copied to themvc.collection.js
test file by accident, so this just reverses that.Around 14 instances of
pluck
were removed from the test file, and replaced withmap
.collection.pluck('id')
=>collection.map((model) => model.get('id'))
The PR also removes the instances of
Array.from
frommvc.Collection
.The PR also fixes exposing
extend
andaddMethodsUtil
frommvcUtils
to the user.TODO: