PHPackages                             nonsensecreativity/dash - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. nonsensecreativity/dash

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

nonsensecreativity/dash
=======================

Kind of like LoDash but in PHP and lighter

04PHP

Since Aug 20Pushed 8y ago1 watchersCompare

[ Source](https://github.com/nonsensecreativity/dash)[ Packagist](https://packagist.org/packages/nonsensecreativity/dash)[ RSS](/packages/nonsensecreativity-dash/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

DASH
====

[](#dash)

**Kind of Like LoDash but smaller**

**NOTE: Require at least PHP VERSION 7.1**

Usage
-----

[](#usage)

`composer require nonsensecreativity\dash`

**Import and call the lib static method**

```
use function NSC\Dash\Iterables;

/**
 * All iterable hook always provide
 * - The current value
 * - The current key
 * - The iterable set
 *
 * @param  int $v
 * @param  int $k
 * @param  iterable $itr
 * @return iterable
 */
$flatMap = Iterables::flatMap([1, 2, 3, 4], function(int $v, int $k, iterable $itr) {
	return [$v + 1, $v];
});
```

**or use via dash static method which will automatically redirecting the called method to proper class**

```
use NSC\Dash\Dash;

Dash::flatMapDeep(
	['a', [ 'b', [ 'c', [ 'd' ] ] ] ],
	function(string $v, int $k, iterable $itr) {
		return [ $v, $v . ' FLATMAPDEEP' ];
	}
);
```

**or use sequence**

```
$seq = Sequence::from([1, [2, [3, [4, 5]]]]);
$seq->flatten()
	->reverse()
	->flatMap(function($v, $k, $iterable) {
		return [$v, $v];
	})
	->result();
```

**TODO**

- Add Test Case (some sample already added)
- More Functionality

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/6bc9b8f0e0e803053dbf4cfbf88cb7fbadfbd36a892f8e31623e1d2a366169ab?d=identicon)[nonsensecreativity](/maintainers/nonsensecreativity)

---

Top Contributors

[![nonsensecreativity](https://avatars.githubusercontent.com/u/14862032?v=4)](https://github.com/nonsensecreativity "nonsensecreativity (18 commits)")

### Embed Badge

![Health badge](/badges/nonsensecreativity-dash/health.svg)

```
[![Health](https://phpackages.com/badges/nonsensecreativity-dash/health.svg)](https://phpackages.com/packages/nonsensecreativity-dash)
```

###  Alternatives

[voku/portable-utf8

Portable UTF-8 library - performance optimized (unicode) string functions for php.

52322.4M40](/packages/voku-portable-utf8)[delight-im/base64

Simple and convenient Base64 encoding and decoding for PHP

15158.1k6](/packages/delight-im-base64)[xelson/flarum-ext-chat

Realtime Chat for Flarum!

229.7k](/packages/xelson-flarum-ext-chat)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
