@xhmikosr/os-filter-obj

3.0.0 • Public • Published

os-filter-obj CI

Filter an array of objects to a specific OS

Install

npm install @xhmikosr/os-filter-obj

Usage

import osFilterObj from '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

Readme

Keywords

Package Sidebar

Install

npm i @xhmikosr/os-filter-obj

Weekly Downloads

287

Version

3.0.0

License

MIT

Unpacked Size

3.22 kB

Total Files

4

Last publish

Collaborators

  • xhmikosr