Replicating airbnb following the atomic design principles...
Home > @nextbnb/common > isUser
Checks whether a given value is an IUser
Signature:
export declare function isUser(arg: any): arg is IUser;
| Parameter | Type | Description | 
|---|---|---|
| arg | any | Value to be evaluated | 
Returns:
arg is IUser
Here’s an example of how to use this guard
const user = { id: '1', username: 'john', name: 'John Parker', iconUrl: 'www.iconUrl.com' }
isUser(user); // true