# @xhmikosr/os-filter-obj

> Filter an array of objects to a specific OS

Latest version **4.1.0** (published 2026-05-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install @xhmikosr/os-filter-obj
pnpm add @xhmikosr/os-filter-obj
yarn add @xhmikosr/os-filter-obj
bun add @xhmikosr/os-filter-obj
```

## Health

**Score 55/100 (C)** — status: active.

Positive: esm support; no vulnerabilities; high maintenance score.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 4.1.0 |
| Published | 2026-05-26 |
| First published | 2024-02-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=20 |
| Dependencies | 1 |
| Unpacked size | 3.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Kevin Mårtensson |
| Maintainers | xhmikosr |
| Keywords | arch, filter, obj, object, os |

## Links

- npm: https://www.npmjs.com/package/@xhmikosr/os-filter-obj
- Repository: https://github.com/XhmikosR/os-filter-obj
- Homepage: https://github.com/XhmikosR/os-filter-obj#readme
- Issues: https://github.com/XhmikosR/os-filter-obj/issues
- npm.io page: https://npm.io/package/@xhmikosr/os-filter-obj

## Dependencies (1)

- [system-architecture](https://npm.io/package/system-architecture.md) ^1.0.0

## Alternatives

- [angular-pipes](https://npm.io/package/angular-pipes.md) — 5.6K weekly downloads
- [@ng-web-apis/midi](https://npm.io/package/@ng-web-apis/midi.md) — 2.6K weekly downloads
- [happn-3](https://npm.io/package/happn-3.md) — 1.6K weekly downloads
- [@opensip-cli/lang-go](https://npm.io/package/@opensip-cli/lang-go.md) — 1.2K weekly downloads
- [mongoose-typescript](https://npm.io/package/mongoose-typescript.md) — 85 weekly downloads

## Recent versions

- 4.1.0 (latest) — 2026-05-26
- 4.0.0 — 2026-02-28
- 3.0.0 — 2024-02-12

## README

# @xhmikosr/os-filter-obj [![npm version](https://img.shields.io/npm/v/@xhmikosr/os-filter-obj?logo=npm&logoColor=fff)](https://www.npmjs.com/package/@xhmikosr/os-filter-obj) [![CI Status](https://img.shields.io/github/actions/workflow/status/XhmikosR/os-filter-obj/ci.yml?branch=master&label=CI&logo=github)](https://github.com/XhmikosR/os-filter-obj/actions/workflows/ci.yml?query=branch%3Amaster)

> Filter an array of objects to a specific OS

## Install

```sh
npm install @xhmikosr/os-filter-obj
```

## Usage

```js
import osFilterObj from '@xhmikosr/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](https://github.com/kevva)

---
_Source: https://npm.io/package/@xhmikosr/os-filter-obj · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
