Skip to content

LinusU/has-own-property

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Has Own Property?

Check if an object has a local property.

Installation

npm install --save has-own-property

Usage

import hasOwnProperty from 'has-own-property'

const obj = { a: 1 }

hasOwnProperty(obj, 'a') // true
hasOwnProperty(obj, 'b') // false

API

hasOwnProperty(object, name)

  • object (object, required)
  • name (string | number | symbol, required)
  • returns boolean

Determines whether an object has a property with the specified name.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published