Visitar URL original
stacks/storage/framework/core/collections at main · stacksjs/stacks · GitHub
Skip to content

Latest commit

 

History

History

collections

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Stacks Collections

Easily work with via Laravel-like collections.

☘️ Features

  • Access to Laravel-like Collections API
  • Other object helpers

🤖 Usage

bun install -d @stacksjs/collections

Now, you can easily access it in your project:

import { collect } from '@stacksjs/collections'

const collection = collect([{
  name: 'My story',
  pages: 176,
}, {
  name: 'Fantastic Beasts and Where to Find Them',
  pages: 1096,
}])

console.log(collection.avg('pages')) // 636

To view the full documentation, please visit https://stacksjs.com/collections.

🧪 Testing

bun test

📈 Changelog

Please see our releases page for more information on what has changed recently.

🚜 Contributing

Please review the Contributing Guide for details.

🏝 Community

For help, discussion about best practices, or any other conversation that would benefit from being searchable:

Discussions on GitHub

For casual chit-chat with others using this package:

Join the Stacks Discord Server

🙏🏼 Credits

Many thanks to the following core technologies & people who have contributed to this package:

📄 License

The MIT License (MIT). Please see LICENSE for more information.

Made with 💙