# obchecked

> A NodeJS library to retreive all differences between two items without all of the complex logic.

Latest version **1.0.1** (published 2022-05-24) · ISC license · 0 weekly downloads

## Install

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

## 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.1 |
| Published | 2022-05-24 |
| First published | 2022-05-23 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 17.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Thomas Bardsley |
| Maintainers | altrius |

## Links

- npm: https://www.npmjs.com/package/obchecked
- npm.io page: https://npm.io/package/obchecked

## Recent versions

- 1.0.1 (latest) — 2022-05-24
- 1.0.0 — 2022-05-23

## README

# Obchecked

A package to help with finding the difference between two values, no matter their type.

## Installation

- NPM:

```
npm install obchecked
```

- Yarn:

```
yarn add obchecked
```

## Usage

JavaScript usage:

```js
const obchecked = require('obchecked');

const Value1 = 'Lorem ipsum';
const Value2 = 'Lorem ipsum dolor';


// Compare your values and see what is returned.
let differences = obchecked(Value1, Value2);


// In this case, `differences` would be a DiffList containing 7 entries.
// One entry is added due to the difference in string length.
// Six entries are added due to the characters being different between the two strings.
```

Typescript usage:

```ts
// Import Obchecked into your project.
import obchecked from 'obchecked';

const Value1: string = 'Lorem ipsum';
const Value2: string = 'Lorem ipsum dolor';

// Compare your values and see what is returned.
let differences: DiffList = obchecked(Value1, Value2);


// In this case, `differences` would be a DiffList containing 7 entries.
// One entry is added due to the difference in string length.
// Six entries are added due to the characters being different between the two strings.
```

And that is pretty much all you need to know

## Support
Obchecked is supported in both browser and on NodeJS. 

Sorry Deno users, however I may not have the time to build a Deno version of this project.
Feel free to fork the repository and fork it for yourself.

## Type Supported
Obchecked currently supports the following:
- Primitive Types:
  - Null values
  - Undefined values
  - Strings
  - Numbers and Floats
  - BigInts
  - NaN and Infinity values
  - Booleans
- Objects (and by extension classes and interfaces)
  - Arrays
  - Maps


According to [this list from Mozilla](developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures) Obchecked has official support for all 7 of the primitive types within JavaScript.


Things we do not currently support:
- Buffers
- Functions

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