Files
tryno10/app/code/node_modules/collect.js/docs/api/pull.md
T
2022-04-07 18:09:31 +05:30

357 B

pull()

The pull method removes and returns an item from the collection by its key:

const collection = collect({
  firstname: 'Michael',
  lastname: 'Cera',
});

collection.pull('lastname');

// Cera

collection.all();

// { firstname: 'Michael' }

View source on GitHub