Files
ihrm/node_modules/collect.js/docs/api/pull.md
Nikhil Ravi Cybrosys e1794e7422 [UPDT]translations in the views (#4)
[UPDT]Translations in the views
[FIX]major bug fixes
2023-05-18 15:05:28 +05:30

20 lines
376 B
Markdown
Executable File

# `pull()`
The pull method removes and returns an item from the collection by its key:
```js
const collection = collect({
firstname: 'Michael',
lastname: 'Cera',
});
collection.pull('lastname');
// Cera
collection.all();
// { firstname: 'Michael' }
```
[View source on GitHub](https://github.com/ecrmnn/collect.js/blob/master/src/methods/pull.js)