Skip to content

Latest commit

 

History

History
33 lines (21 loc) · 599 Bytes

has.md

File metadata and controls

33 lines (21 loc) · 599 Bytes

objects.has

has(object, path)

Has, creates an array of values corresponding to paths of the object

Arguments

  1. object (object): input object
  2. path (Array|string): strings describing paths to be returned from an object

Returns

(boolean): boolean true is a direct property of the object

Example

const result = objects.has({ front: [1, 3, 5], back: [37, 39] });
console.log(result, 'back[1]');
> true