New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

lambda.js

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lambda.js

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

latest
npmnpm
Version
2.0.2
Version published
Maintainers
1
Created
Source

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

Keywords

functional

FAQs

Package last updated on 12 Aug 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts