functional-augments-object

0.1.1 • Public • Published

Functional Augments for ES6 objects

Build Status

This package augments the Object.prototype to provide ES6 objects with methods for functional programming similar to Arrays. Currently the following methods are provided:

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

Installation

$ npm install --save functional-augments-object

Usage

'use strict';
 
require('functional-augments-object');
 
const object = {
  one: 1,
  two: 2,
  three: 3
};
 
const reduction = object.reduce((acc, v) => acc + v);
 
console.log(reduction); // 6

Package Sidebar

Install

npm i functional-augments-object

Weekly Downloads

3

Version

0.1.1

License

ISC

Last publish

Collaborators

  • daniel-ac-martin