JSPM

sum-component

0.1.1
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 354
    • Score
      100M100P100Q89961F

    Sum utility

    Package Exports

    • sum-component

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (sum-component) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    sum

    Sum utility

    Installation

    $ component install component/sum

    API

    sum(array, [fn|string])

    Sum an array of numbers:

    sum([1,2,3,4,5]);

    Sum properties with callback:

    var sum = sum(users, function(user){
      return user.age;
    });

    map(array, string)

    Sum properties in string:

    sum(users, 'age');
    sum(repos, 'stats.watchers');

    License

    MIT