# objlength

> Returning length of object

Latest version **2.1.4** (published 2021-03-24) · ISC license · 0 weekly downloads

## Install

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

## 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 | 2.1.4 |
| Published | 2021-03-24 |
| First published | 2021-02-25 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 1.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Ameer Ashif |
| Maintainers | ameer.asif777 |
| Keywords | object, length, object length, array, array length, length of array, length of object |

## Links

- npm: https://www.npmjs.com/package/objlength
- Repository: https://github.com/AmeerAsif777/objLength
- Homepage: https://github.com/AmeerAsif777/objLength#readme
- Issues: https://github.com/AmeerAsif777/objLength/issues
- npm.io page: https://npm.io/package/objlength

## Recent versions

- 2.1.4 (latest) — 2021-03-24
- 2.1.3 — 2021-03-24
- 2.1.2 — 2021-02-25
- 2.1.1 — 2021-02-25
- 2.1.0 — 2021-02-25
- 2.0.0 — 2021-02-25
- 1.0.0 — 2021-02-25

## README

# objlength
<br />

>You might wonder, for knowing the length of array, we can do like

```
const a= [1,2,3,4]
console.log(a.length); // Returns length of a
```

>But for object, we can't do like the above way, and we have to suppose do like the below way

```
const a = {name: "ameer", age: 98}
Object.keys(a).length // Returns length of a
```

## To make it easy, follow the below way

```js
import objectLength from 'objlength';

let a = {name: "ameerr", age: 98}
console.log(objectLength(a)); //length of a
```

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