JSPM

os-filter-obj

2.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1457999
  • Score
    100M100P100Q204137F
  • License MIT

Filter an array of objects to a specific OS

Package Exports

  • os-filter-obj

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (os-filter-obj) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

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