my-idlers/node_modules/collect.js/docs/api/pull.md
cp6 fd22b0bf58 V2 (Laravel re-make)
V2 (Laravel re-make)
2022-03-06 02:02:12 +11:00

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