0.0.4 • Published 10 years ago

extrode v0.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
10 years ago

extrode

Build Status Coverage Status

A small library that extracts specified keys from a single object or objects in an array.

Installation

npm install extrode

Usage

  • Example usage for object arrays:
var extrode = require('extrode');
var dirtyArray = [{ x: 1, y: 2 }, { x: 3, y: 4 }, { x: 5, y: 6}];

var result = extrode(dirtyArray, ['x']);

Output should be [{ x: 1 }, { x: 3 }, { x: 5 }]

  • Example usage for a single object:

var extrode = require('extrode');
var dirtyObject = { x: 1, y: 2 };

var result = extrode(dirtyObject, ['x']);

Output should be { x: 1 }

Tests

npm test

Contributing

In lieu of a formal style guide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago