os-filter-obj ![Build Status](https://camo.githubusercontent.com/ee6a2d1b38087eaadefb901b55231c17730d9f3c5dde1815626c0051b8e42f94/68747470733a2f2f7472617669732d63692e6f72672f6b657676612f6f732d66696c7465722d6f626a2e7376673f6272616e63683d6d6173746572)
Filter an array of objects to a specific OS
Install
$ npm install os-filter-obj
Usage
const osFilterObj = require('os-filter-obj');
const objects = [{
os: 'linux',
arch: 'x64',
foo: 'unicorn',
bar: 'cow'
}, {
os: 'darwin',
arch: 'x64',
foo: 'unicorn',
bar: 'cow'
},{
os: 'win32',
arch: 'x64',
foo: 'unicorn',
bar: 'cow'
}];
osFilterObj(objects);
/*
[{
os: 'linux',
arch: 'x64',
foo: 'unicorn',
bar: 'cow'
}];
*/
API
osFilterObj(objects)
Returns an Array
with the filtered objects.
objects
Type: Array
The Array
to filter.
License
MIT © Kevin Mårtensson