# @stacksjs/collections

> The Stacks collections.

Latest version **0.74.45** (published 2026-09-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install @stacksjs/collections
pnpm add @stacksjs/collections
yarn add @stacksjs/collections
bun add @stacksjs/collections
```

## Health

**Score 55/100 (C)** — status: active.

Positive: no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads; no types; no esm support; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.74.45 |
| Published | 2026-09-11 |
| First published | 2022-10-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 620 |
| Author | Chris Breuer |
| Maintainers | chrisbreuer, glenn123 |
| Keywords | collections, laravel, collectjs, utilities, functions, stacks |

## Links

- npm: https://www.npmjs.com/package/@stacksjs/collections
- Repository: https://github.com/stacksjs/stacks
- Homepage: https://github.com/stacksjs/stacks/tree/main/storage/framework/core/collections#readme
- Issues: https://github.com/stacksjs/stacks/issues
- Funding: https://github.com/sponsors/chrisbbreuer
- npm.io page: https://npm.io/package/@stacksjs/collections

## Recent versions

- 0.74.45 (latest) — 2026-09-11
- 0.74.46 (staging) — 2026-09-11
- 0.74.43 — 2026-09-11
- 0.74.42 — 2026-09-10
- 0.74.41 — 2026-09-10
- 0.74.40 — 2026-09-10
- 0.74.39 — 2026-09-10
- 0.74.38 — 2026-09-10
- 0.74.37 — 2026-09-10
- 0.74.36 — 2026-09-10
- 0.74.35 — 2026-09-10
- 0.74.34 — 2026-09-10
- 0.74.33 — 2026-09-09
- 0.74.32 — 2026-09-09
- 0.74.31 — 2026-09-08
- … 641 more at https://npm.io/package/@stacksjs/collections/versions

## README

# Stacks Collections

Easily work with via Laravel-like collections.

## ☘️ Features

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

## 🤖 Usage

```bash
bun install -d @stacksjs/collections
```

Now, you can easily access it in your project:

```js
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/collection>s](https://stacksjs.com/collections).

## 🧪 Testing

```bash
bun test
```

## 📈 Changelog

Please see our [releases](https://github.com/stacksjs/stacks/releases) page for more information on what has changed recently.

## 🚜 Contributing

Please review the [Contributing Guide](https://github.com/stacksjs/contributing) for details.

## 🏝 Community

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

[Discussions on GitHub](https://github.com/stacksjs/stacks/discussions)

For casual chit-chat with others using this package:

[Join the Stacks Discord Server](https://stacksjs.com/discord)

## 🙏🏼 Credits

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

- [Collect.js](https://github.com/ecrmnn/collect.js)
- [Laravel](https://laravel.com/)
- [Chris Breuer](https://github.com/chrisbbreuer)
- [All Contributors](../../contributors)

## 📄 License

The MIT License (MIT). Please see [LICENSE](https://github.com/stacksjs/stacks/tree/main/LICENSE.md) for more information.

Made with 💙

---
_Source: https://npm.io/package/@stacksjs/collections · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
