Files
rspade_system/node_modules/collect.js/docs/api/forget.md
root bd5809fdbd Reorganize RSpade directory structure for clarity
Improve Jqhtml_Integration.js documentation with hydration system explanation
Add jqhtml-laravel integration packages for traditional Laravel projects

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 09:41:48 +00:00

485 B

forget()

The forget method removes an item from the collection by its key:

const collection = collect({
  name: 'Darwin Núñez',
  number: 27,
});

collection.forget('number');

collection.all();

// {
//   name: 'Darwin Núñez',
// }

Unlike most other collection methods, forget does not return a new modified collection; it modifies the collection it is called on.

View source on GitHub