ofo

os-filter-obj

Filter an array of objects to a specific OS

Showing:

Popularity

Downloads/wk

986K

GitHub Stars

7

Maintenance

Last Commit

4yrs ago

Contributors

1

Package

Dependencies

1

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

os-filter-obj Build Status

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

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial