Socket
Socket
Sign inDemoInstall

os-filter-obj

Package Overview
Dependencies
1
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

os-filter-obj

Filter an array of objects to a specific OS


Version published
Maintainers
1
Weekly downloads
1,492,934
decreased by-5.94%

Weekly downloads

Readme

Source

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

Keywords

FAQs

Last updated on 25 Jul 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc