Download the PHP package dsheiko/extras without Composer
On this page you can find all versions of the php package dsheiko/extras. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download dsheiko/extras
More information about dsheiko/extras
Files in dsheiko/extras
Download dsheiko/extras
More information about dsheiko/extras
Files in dsheiko/extras
Vendor dsheiko
Package extras
Short Description Chainable, high-order utility functions for PHP arrays, strings, numbers, functions and collections — inspired by JavaScript and Underscore.js
License MIT
Homepage https://github.com/dsheiko/extras
Package extras
Short Description Chainable, high-order utility functions for PHP arrays, strings, numbers, functions and collections — inspired by JavaScript and Underscore.js
License MIT
Homepage https://github.com/dsheiko/extras
Please rate this library. Is it a good library?
Informations about the package extras
Dsheiko\Extras
JavaScript-style utility methods for PHP. Chainable map, filter, reduce, and dozens more — consistent naming, predictable argument order, and a familiar API inspired by Underscore.js and Lodash.
The name comes from "Array Extras" — the array methods added in ES5 that made JavaScript array manipulation practical.
Installation
Highlights
- Consistent naming — all methods use
camelCaseinstead of PHP's mixedlower_caseconventions - Consistent argument order — target value always comes first:
Arrays::method($target, ...$options) - Chainable interface —
Any::chain($value)->map(...)->filter(...)->value() - PlainObject — a JavaScript-style plain object with dot-access and chainable methods
- Native performance — built on PHP's own functions; no
foreachwhere a built-in can do the job - Familiar API — methods match JavaScript, Underscore.js, and Lodash where possible
Utility Sets
| Set | Types covered |
|---|---|
| Arrays | PHP arrays |
| Collections | Iterable, ArrayObject, Iterator |
| Strings | PHP strings |
| Numbers | Integer, Double, NaN |
| Booleans | PHP booleans |
| Functions | PHP callables |
| Plain Object | stdClass-like objects |
| Any | Any PHP type |
| Chaining | Fluent chain API |
| Utilities | Standalone helpers |
Download
Dsheiko\Extras Cheatsheet (PDF)
Architecture
Examples
Static method call
Chaining
Constructing from an object
PlainObject
All versions of extras with dependencies
PHP Build Version
Package Version
Requires
php Version
>=7.0.0
The package dsheiko/extras contains the following files
Loading the files please wait ...