Skip to main content

Function: isOwnAuthor()

isOwnAuthor(author, userHandle, unknownName?): boolean

Defined in: src/lib/brushes/authors/index.ts:50

Whether a preset's author is the user: their handle matches, or for a user without a handle, the author has the unknown author's name (unknownName) and no handle.

Parameters​

author​

AssetAuthor | undefined

userHandle​

string

unknownName?​

string = UNKNOWN_AUTHOR

Returns​

boolean

Example​

isOwnAuthor({ name: "Ada", handle: "ada.example" }, "ada.example"); // true
isOwnAuthor({ name: "Unknown" }, ""); // true