@stacksjs/objects 0.37.9 → 0.38.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -13
- package/package.json +8 -7
package/README.md
CHANGED
|
@@ -1,32 +1,35 @@
|
|
|
1
1
|
# Stacks Objects
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Easily work with objects.
|
|
4
4
|
|
|
5
5
|
## ☘️ Features
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
- ⚡️
|
|
10
|
-
|
|
11
|
-
wip
|
|
7
|
+
- Access to Laravel-like Collections API
|
|
8
|
+
- Other object helpers
|
|
12
9
|
|
|
13
10
|
## 🤖 Usage
|
|
14
11
|
|
|
15
|
-
wip
|
|
16
|
-
|
|
17
12
|
```bash
|
|
18
13
|
pnpm i -D @stacksjs/objects
|
|
19
14
|
```
|
|
20
15
|
|
|
21
|
-
Now, you can
|
|
16
|
+
Now, you can easily access it in your project:
|
|
22
17
|
|
|
23
18
|
```js
|
|
24
|
-
import
|
|
19
|
+
import { collect } from '@stacksjs/objects'
|
|
20
|
+
|
|
21
|
+
const collection = collect([{
|
|
22
|
+
name: 'My story',
|
|
23
|
+
pages: 176,
|
|
24
|
+
}, {
|
|
25
|
+
name: 'Fantastic Beasts and Where to Find Them',
|
|
26
|
+
pages: 1096,
|
|
27
|
+
}])
|
|
25
28
|
|
|
26
|
-
//
|
|
29
|
+
console.log(collection.avg('pages')) // 636
|
|
27
30
|
```
|
|
28
31
|
|
|
29
|
-
|
|
32
|
+
To view the full documentation, please visit [https://stacksjs.dev/objects](https://stacksjs.dev/objects).
|
|
30
33
|
|
|
31
34
|
## 🧪 Testing
|
|
32
35
|
|
|
@@ -36,7 +39,7 @@ pnpm test
|
|
|
36
39
|
|
|
37
40
|
## 📈 Changelog
|
|
38
41
|
|
|
39
|
-
Please see our [releases](https://github.com/stacksjs/
|
|
42
|
+
Please see our [releases](https://github.com/stacksjs/stacks/releases) page for more information on what has changed recently.
|
|
40
43
|
|
|
41
44
|
## 💪🏼 Contributing
|
|
42
45
|
|
|
@@ -52,6 +55,15 @@ For casual chit-chat with others using this package:
|
|
|
52
55
|
|
|
53
56
|
[Join the Open Web Discord Server](https://discord.ow3.org)
|
|
54
57
|
|
|
58
|
+
## 🙏🏼 Credits
|
|
59
|
+
|
|
60
|
+
Many thanks to the following core technologies & people who have contributed to this package:
|
|
61
|
+
|
|
62
|
+
- [Collect.js](https://github.com/ecrmnn/collect.js)
|
|
63
|
+
- [Laravel](https://laravel.com/)
|
|
64
|
+
- [Chris Breuer](https://github.com/chrisbbreuer)
|
|
65
|
+
- [All Contributors](../../contributors)
|
|
66
|
+
|
|
55
67
|
## 📄 License
|
|
56
68
|
|
|
57
69
|
The MIT License (MIT). Please see [LICENSE](https://github.com/stacksjs/stacks/tree/main/LICENSE.md) for more information.
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/objects",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
5
|
-
"packageManager": "pnpm@7.
|
|
4
|
+
"version": "0.38.3",
|
|
5
|
+
"packageManager": "pnpm@7.15.0",
|
|
6
6
|
"description": "The Stacks objects.",
|
|
7
7
|
"author": "Chris Breuer",
|
|
8
8
|
"license": "MIT",
|
|
@@ -29,17 +29,18 @@
|
|
|
29
29
|
"Chris Breuer <chris@ow3.org>"
|
|
30
30
|
],
|
|
31
31
|
"files": [
|
|
32
|
-
"dist"
|
|
32
|
+
"dist",
|
|
33
|
+
"README.md"
|
|
33
34
|
],
|
|
34
35
|
"engines": {
|
|
35
|
-
"node": ">=v18.
|
|
36
|
-
"pnpm": ">=7.
|
|
36
|
+
"node": ">=v18.12.1",
|
|
37
|
+
"pnpm": ">=7.15.0"
|
|
37
38
|
},
|
|
38
39
|
"dependencies": {
|
|
39
|
-
"@stacksjs/collections": "0.
|
|
40
|
+
"@stacksjs/collections": "0.38.3"
|
|
40
41
|
},
|
|
41
42
|
"devDependencies": {
|
|
42
|
-
"mkdist": "^0.
|
|
43
|
+
"mkdist": "^0.4.0",
|
|
43
44
|
"typescript": "^4.8.4"
|
|
44
45
|
},
|
|
45
46
|
"scripts": {
|