vituarvom / react-smart-utils

A simple, smart hooks and utility functions to make development easier
https://www.npmjs.com/package/react-smart-utils
13 stars 34 forks source link

Create hasKey Utility Function #41

Open bharat-dussa opened 4 weeks ago

bharat-dussa commented 4 weeks ago

hasKey

Checks if an object contains a specific key.

File: src/utils/object/hasKey/hasKey.ts Test File: src/utils/object/hasKey/hasKey.test.ts

Parameters:

Returns:

Example:

hasKey({ a: 1, b: 2 }, 'a');  // true
hasKey({ a: 1, b: 2 }, 'c');  // false
vigneshbirru commented 4 weeks ago

"I'd love to assist with this issue—what are the next steps?"