Socket
Socket
Sign inDemoInstall

@xhmikosr/os-filter-obj

Package Overview
Dependencies
1
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xhmikosr/os-filter-obj


Version published
Weekly downloads
1.4K
decreased by-32.89%
Maintainers
1
Install size
12.2 kB
Created
Weekly downloads
 

Readme

Source

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

Keywords

FAQs

Last updated on 12 Feb 2024

Did you know?

Socket

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc