Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

functional-augments

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

functional-augments

Augment collection prototypes with methods for functional programming, including filter(), map() and reduce().

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-98.28%
Maintainers
1
Weekly downloads
 
Created
Source

Functional Augments for ES6 objects

Build Status

This package augments the prototypes of the following collections in ES6 with methods for functional programming similar to Arrays:

  • Map
  • Object
  • Set
  • String

Currently the following methods are provided:

  • filter()
  • map()
  • reduce()

Functions provided to methods on keyed collections take an optional third parameter for the key.

Installation

$ npm install --save functional-augments

Usage

'use strict';

require('functional-augments');

const object = {
  one: 1,
  two: 2,
  three: 3
};

const reduction = object.reduce((acc, v) => acc + v);

console.log(reduction); // 6

Keywords

FAQs

Package last updated on 28 Feb 2018

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc