mirror of
https://github.com/mmahdium/portfolio.git
synced 2026-08-16 21:14:31 +03:30
Initial commit (secrets removed)
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
// Find an item in `items` array, given a specific key/value.
|
||||
export const findBy = <T>(key: keyof T, value: T[keyof T], items: T[]): T | undefined =>
|
||||
items.find((obj) => obj[key] === value)
|
||||
Reference in New Issue
Block a user