is-data-descriptor
Returns true if a value has the characteristics of a valid JavaScript data descriptor.
Please consider following this project's author, Jon Schlinkert, and consider starring the project to show your ❤️ and support.
Install
Install with npm:
Usage
Examples
true
when the descriptor has valid properties with valid values.
false
when not an object
false
when the object has invalid properties
false
when a value is not the correct type
Valid properties
The only valid data descriptor properties are the following:
configurable
(required)enumerable
(required)value
(optional)writable
(optional)
To be a valid data descriptor, either value
or writable
must be defined.
Invalid properties
A descriptor may have additional invalid properties (an error will not be thrown).
About
Related projects
You might also be interested in these projects:
is-accessor-descriptor: Returns true if a value has the characteristics of a valid JavaScript accessor descriptor. | homepage
is-data-descriptor: Returns true if a value has the characteristics of a valid JavaScript data descriptor. | homepage
is-descriptor: Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for… more | homepage
Contributors
Commits | Contributor |
21 | |
2 |
Author
Jon Schlinkert
License
Copyright © 2017, Jon Schlinkert. Released under the MIT License.
This file was generated by verb-generate-readme, v0.6.0, on November 01, 2017.
Last updated