@kingjs/linq.sum

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

Stats

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

Readme

@kingjs/linq.sum

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

Usage

Sum 1, 2, and 3 like this:

var sum = require('@kingjs/linq.sum');
var sequence = require('@kingjs/enumerable.create');

var summation = sum.call(sequence(1, 2, 3));

result:

6

API

declare function sum(
  this: Enumerable
): number;

Interfaces

  • Enumerable: See @kingjs/enumerable.define.

    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.

    License

    MIT

Analytics

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.