2.1.4 • Published 3 years ago

objlength v2.1.4

Weekly downloads
202
License
ISC
Repository
github
Last release
3 years ago

objlength

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

import objectLength from 'objlength';

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

3 years ago

2.1.3

3 years ago

2.1.2

3 years ago

2.1.1

3 years ago

2.1.0

3 years ago

2.0.0

3 years ago

1.0.0

3 years ago