# zero-structural-sharing

> This project has been renamed, use [structural-sharing](https://www.npmjs.com/package/structural-sharing) instead &mdash; [js-structural-sharing](https://github.com/mperdikeas/js-structural-sharing) in github.

Latest version **0.0.6** (published 2016-12-11) · ISC license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install zero-structural-sharing
pnpm add zero-structural-sharing
yarn add zero-structural-sharing
bun add zero-structural-sharing
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2016-12-11 |
| First published | 2016-12-11 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | marcusjuniusbrutus |
| Keywords | object graphs, structural sharing |

## Links

- npm: https://www.npmjs.com/package/zero-structural-sharing
- Repository: https://github.com/mperdikeas/js-zero-structural-sharing
- Homepage: https://github.com/mperdikeas/js-zero-structural-sharing#readme
- Issues: https://github.com/mperdikeas/js-zero-structural-sharing/
- npm.io page: https://npm.io/package/zero-structural-sharing

## Dependencies (6)

- [chai](https://npm.io/package/chai.md) ^3.5.0
- [babel-polyfill](https://npm.io/package/babel-polyfill.md) ^6.7.4
- [babel-register](https://npm.io/package/babel-register.md) ^6.14.0
- [obj-properties](https://npm.io/package/obj-properties.md) ^0.2.0
- [source-map-support](https://npm.io/package/source-map-support.md) ^0.4.0
- [babel-plugin-transform-object-rest-spread](https://npm.io/package/babel-plugin-transform-object-rest-spread.md) ^6.8.0

## Alternatives

- [d3-force-3d](https://npm.io/package/d3-force-3d.md) — 1.0M weekly downloads
- [ng2-charts](https://npm.io/package/ng2-charts.md) — 486.8K weekly downloads
- [@arcgis/core](https://npm.io/package/@arcgis/core.md) — 257.8K weekly downloads
- [react-sparklines](https://npm.io/package/react-sparklines.md) — 249.3K weekly downloads
- [react-native-gifted-charts](https://npm.io/package/react-native-gifted-charts.md) — 182.3K weekly downloads

## Recent versions

- 0.0.6 (latest) — 2016-12-11
- 0.0.5 — 2016-12-11
- 0.0.4 — 2016-12-11
- 0.0.3 — 2016-12-11
- 0.0.2 — 2016-12-11
- 0.0.1 — 2016-12-11

## README

# WARNING

This project has been renamed, use [structural-sharing](https://www.npmjs.com/package/structural-sharing)
instead &mdash; [js-structural-sharing](https://github.com/mperdikeas/js-structural-sharing) in github.


# js-zero-structural-sharing
Tests that two objects (recursively) have zero structural sharing. In other words, nowhere do they access a common memory location.

## Installation


    npm install zero-structural-sharing --save


## Usage

```javascript

  import {shareMemory} from 'zero-structural-sharing'

```

## Examples
```javascript

   import {shareMemory} from 'zero-structural-sharing'
   const o = {};
   const a1 = {a1: {a2: {v:1, y:2}, a3: o}, a4: [1,2,3,4]};
   const a2 = {a1: {a2: [1, 2,3, [1, 3, [1, 2, o]]]}, a4: [1,2,3,4]};           
   assert.isTrue(shareMemory(o, a1));
   assert.isTrue(shareMemory(o, a2));
   assert.isTrue(shareMemory(a1, a2));           

```

For more examples look in file *test.js*


## Tests

    npm test

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