0.1.1 • Published 6 years ago

functional-augments-object v0.1.1

Weekly downloads
1
License
ISC
Repository
github
Last release
6 years ago

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