UNPKG

violet-paginator

Version:

Display, paginate, sort, filter, and update items from the server. violet-paginator is a complete list management library for react/redux applications.

10 lines (8 loc) 181 B
export function updateListItem(list, id, update, identifier = 'id') { return list.map(i => { if (i.get(identifier) === id) { return update(i) } return i }) }