# lambda.js

> Functional extension methods (inspired by LINQ .NET) on JavaScript arrays

Latest version **2.0.2** (published 2016-08-12) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install lambda.js
pnpm add lambda.js
yarn add lambda.js
bun add lambda.js
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2016-08-12 |
| First published | 2016-07-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | James A. Prempeh |
| Maintainers | prmph |
| Keywords | functional, linq, array |

## Links

- npm: https://www.npmjs.com/package/lambda.js
- npm.io page: https://npm.io/package/lambda.js

## Dependencies (2)

- [associative](https://npm.io/package/associative.md) ^1.0.0
- [type-detect](https://npm.io/package/type-detect.md) ^2.0.1

## Recent versions

- 2.0.2 (latest) — 2016-08-12
- 2.0.1 — 2016-08-12
- 2.0.0 — 2016-08-09
- 1.1.0 — 2016-08-09
- 1.0.4 — 2016-08-04
- 1.0.3 — 2016-08-03
- 1.0.2 — 2016-08-03
- 1.0.1 — 2016-07-20

## README

# lambda.js
Functional extension methods (inspired by LINQ .NET) on JavaScript arrays

THIS PACKAGE IS DEPRECATED!
Please switch to the array-x package (https://www.npmjs.com/package/array-x)



## Examples
```
require("lambda.js")(); // Note that, starting with version 2.0.0, the imported module function must be executed to extend the array type

var arr = [1, 2, 3, 4, 5, 6, 7];
arr.forAll((item) => console.log(item));
console.log(arr.select((item) => item * 10));
console.log(arr.where((item) => item > 4));
```


## API
Array.prototype.forAll(function);

Array.prototype.select(function);

Array.prototype.distinct();

Array.prototype.where(function);

Array.prototype.all(function);

Array.prototype.any(function);

Array.prototype.accumulate(initial, function);

Array.prototype.firstOrDefault(function);

Array.prototype.first(function);

Array.prototype.lastOrDefault(function);

Array.prototype.last(function);

Array.prototype.union(array);

Array.prototype.orderBy(function);

Array.prototype.orderByDesc(function);

Array.prototype.sum(function);

Array.prototype.count(function);

Array.prototype.avg(function);

Array.prototype.max(function);

Array.prototype.min(function);

Array.prototype.groupBy(function);

Array.prototype.groupAggregate(key, value, aggregation);

Array.prototype.removeItem(item);

Array.prototype.removeAt(index);

Array.prototype.insert(index, item);


## Install
npm install lambda.js --save

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