# xcept

> Allows objects and arrays to omit elements

Latest version **1.0.0** (published 2015-08-11) · ISC license · 0 weekly downloads

## Install

```sh
npm install xcept
pnpm add xcept
yarn add xcept
bun add xcept
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2015-08-11 |
| First published | 2015-08-11 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Joey Sham |
| Maintainers | joeyism |
| Keywords | except, xcept, array, object, omit, elements, without, ignore, prototype |

## Links

- npm: https://www.npmjs.com/package/xcept
- Repository: https://github.com/joeyism/node-xcept
- Homepage: https://github.com/joeyism/node-xcept#readme
- Issues: https://github.com/joeyism/node-xcept/issues
- npm.io page: https://npm.io/package/xcept

## Recent versions

- 1.0.0 (latest) — 2015-08-11

## README

# Xcept

[![Build Status](https://travis-ci.org/joeyism/node-xcept.svg?branch=master)](https://travis-ci.org/joeyism/node-xcept)
A module that allows object and arrays to omit elements

## Installation

    > npm install --save xcept

## Usage
To use for array or object, adding either *.omit* or *.except* at the end will work. To load the module, just require it as such:

    require("xcept");

### Array

**except**

    [1, 2, 3].omit(1) // [2, 3]
    [1, 2, 3].omit(2) // [1, 3]
    [1, 2, 3].omit(3) // [1, 2]
    [1, 2, 3, 4, 5].omit(1).omit(2).omit(3) // [4, 5]

**omit**
    
    [1, 2, 3].except(1) // [2, 3]
    [1, 2, 3].except(2) // [1, 3]
    [1, 2, 3].except(3) // [1, 2]
    [1, 2, 3, 4, 5].except(1).except(2).except(3) // [4, 5]

### Object

**except**

    { "a": "some value", "b": "other value", "c": "more value" }.omit(a) // { "b": "other value", "c": "more value" }
    { "a": "some value", "b": "other value", "c": "more value" }.omit(b) // { "a": "some value", "c": "more value" }
    { "a": "some value", "b": "other value", "c": "more value" }.omit(c) // { "a": "some value", "b": "other value" } 
    { "a": "some value", "b": "other value", "c": "more value" }.omit(a).omit(c) // { "b": "other value" } 

**omit**

    { "a": "some value", "b": "other value", "c": "more value" }.except(a) // { "b": "other value", "c": "more value" }
    { "a": "some value", "b": "other value", "c": "more value" }.except(b) // { "a": "some value", "c": "more value" }
    { "a": "some value", "b": "other value", "c": "more value" }.except(c) // { "a": "some value", "b": "other value" } 
    { "a": "some value", "b": "other value", "c": "more value" }.except(a).except(c) // { "b": "other value" } 

## Versions
**1.0.0**
* First working version

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