Socket
Book a DemoInstallSign in
Socket

@xhmikosr/os-filter-obj

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xhmikosr/os-filter-obj

Filter an array of objects to a specific OS

latest
Source
npmnpm
Version
3.0.0
Version published
Weekly downloads
1.1M
59.03%
Maintainers
1
Weekly downloads
 
Created
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

arch

FAQs

Package 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