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

Commit

Permalink
chore(api) simplfied comment for searchJSON
Browse files Browse the repository at this point in the history
  • Loading branch information
heybereket committed May 1, 2021
1 parent 46dab25 commit ffda986
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/api/src/utils/lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ export const generatedNumber = (n = 10) => {

// Search a JSON Object
export const searchJSON = (json: any[], key: string | symbol, value: any) => {
// If index is -1 (not found), return false, else return true
// If index is -1 (not found), return false, else return true
return json.findIndex((data) => data[key] === value) !== -1;
};

0 comments on commit ffda986

Please sign in to comment.