Skip to content
This repository has been archived by the owner on Oct 20, 2021. It is now read-only.

Latest commit

 

History

History
22 lines (17 loc) · 506 Bytes

property-key.md

File metadata and controls

22 lines (17 loc) · 506 Bytes

Property Key

Validates if the given input is a property key.

Valid values:

validator.propertyKey().validate('foo');
validator.propertyKey().validate(10);
validator.propertyKey().validate(String('foo'));
validator.propertyKey().validate(Number(5));
validator.propertyKey().validate(Symbol('foo'));

Invalid values:

validator.propertyKey().validate(true);
validator.propertyKey().validate(false);
validator.propertyKey().validate(null);
validator.propertyKey().validate(undefined);