@kingjs/linq.sum

Computes the sum of a sequence of numbers projected from elements of a sequence.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
@kingjs/linq.sum
0101.0.65 years ago5 years agoMinified + gzip package size for @kingjs/linq.sum in KB

Readme

Computes the sum of a sequence of numbers projected from elements of a sequence.

Usage

Sum 1, 2, and 3 like this: ```js var sum = require('@kingjs/linq.sum'); var sequence = require('@kingjs/enumerable.create'); var summation = sum.call(sequence(1, 2, 3)); ``` result: ```js 6 ```

API

```ts declare function sum( this: Enumerable ): number; ```

Interfaces

Parameters

  • this: The sequence to sum.

Return Value

The summation of the sequence.

Install

With npm installed, run ``` $ npm install @kingjs/linq.sum ```

Acknowledgments

Like Element.Sum.aspx).

License

MIT Analytics