lc-is-empty-object

1.0.0 • Public • Published

typeOf

Check a object is empty

Reference

http://stackoverflow.com/questions/4994201/is-object-empty

Example

isEmpty(""), // true
isEmpty(33), // true (arguably could be a TypeError)
isEmpty([]), // true
isEmpty({}), // true
isEmpty({length: 0, custom_property: []}), // true
 
isEmpty("Hello"), // false
isEmpty([1,2,3]), // false
isEmpty({test: 1}), // false
isEmpty({length: 3, custom_property: [1,2,3]}) // false

Readme

Keywords

none

Package Sidebar

Install

npm i lc-is-empty-object

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • elantion