Registry / utility / dusank-knapsack

dusank-knapsack

JSON →
library10.0.0phppackagistunverified

Collection library for PHP

composer require dusank/knapsack
INSTALL
IMPORT
SIG · DUSANK-KNAPSACK
D
dusank-knapsack
utilityphpv10.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Collection
✓ use DusanKasan\Knapsack\Collection;

Create and manipulate a collection with functional methods

use DusanKasan\Knapsack\Collection; $collection = Collection::from([1, 2, 3, 4, 5]); $result = $collection->filter(function($v) { return $v > 2; }) ->map(function($v) { return $v * 2; }) ->toArray(); // $result = [6, 8, 10]
Debug
Known issues

No known issues recorded.

Upgrade
Version history
10.0.0latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
dusank-knapsack — pip install dusank-knapsack · libregistry