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
- Host: GitHub
- URL: https://github.com/aleclarson/haskeys
- Owner: aleclarson
- License: mit
- Created: 2016-05-04T13:18:29.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2018-12-05T16:54:43.000Z (over 7 years ago)
- Last Synced: 2025-03-11T12:34:06.305Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 1000 Bytes
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# hasKeys 1.0.0 
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
```