An open API service indexing awesome lists of open source software.

https://github.com/aleclarson/haskeys

Know if Object.keys() would return an empty array
https://github.com/aleclarson/haskeys

Last synced: 10 months ago
JSON representation

Know if Object.keys() would return an empty array

Awesome Lists containing this project

README

          

# hasKeys 1.0.0 ![stable](https://img.shields.io/badge/stability-stable-4EBA0F.svg?style=flat)

Only returns `true` if the given object has at least one key defined.

Inherited keys are not counted!

```coffee
hasKeys = require "hasKeys"

hasKeys {} # => false

hasKeys { foo: true } # => true
```