has()
Determine if a javascript object has a key. Allows for nested key detection.
Installation
With yarn
yarn add ohas
With npm
npm install ohas --save
Usage
; const user = firstname: 'John' lastname: 'Smith' address: street1: '123 Road Way Blvd' street2: 'APT 21' city: 'Brooklyn' state: 'NY' const hasFirstname = ;console; // true const hasCity = ;console; // true const hasZip = ;console; // false const hasUser2 = ;console; // false