# rough-object-size

> return size of object

Latest version **1.0.3** (published 2022-05-12) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install rough-object-size
pnpm add rough-object-size
yarn add rough-object-size
bun add rough-object-size
```

## 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.3 |
| Published | 2022-05-12 |
| First published | 2020-01-13 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 16.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | nir winkler |
| Maintainers | mad_vinking |
| Keywords | object size |

## Links

- npm: https://www.npmjs.com/package/rough-object-size
- Repository: https://github.com/logzio/rough-object-size
- Homepage: https://github.com/logzio/rough-object-size#readme
- Issues: https://github.com/logzio/rough-object-size/issues
- npm.io page: https://npm.io/package/rough-object-size

## Recent versions

- 1.0.3 (latest) — 2022-05-12
- 1.0.2 — 2022-02-10
- 1.0.1 — 2020-01-13
- 1.0.0 — 2020-01-13

## README

<p align="center">
  <a href="http://logz.io">
    <img height="150px" src="https://logz.io/wp-content/uploads/2017/06/new-logzio-logo.png">
  </a>
</p>


# return max object size

## Usage
use OBJECT_SIZE_MAX_LOOPS to change the default 1000 iteration loop
```javascript

  const { roughObjectSize } = require('rough-object-size');


  const circular = {
      ok: 1,
    };
    const object = {
      circular,
      val: 1,
    };

    circular.object = circular;

    roughObjectSize(object) === 16


  const object = {
    bool: true,
    alon: 1,
    shimon: 'shimon',
    arr: [1],
    another: {
      wow: [1, 2, 3],
    },
  };

  roughObjectSize(object) ===(4 + 8 + 6 * 2 + 8 + 3 * 8);

```

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