Token.firstWhere()
Get the first matching accessible Token.
Signature
Token.firstWhere(predicate: () => Boolean)): <Document> | NullToken
Token.firstWhere(predicate: (val: Token) => Boolean)): <Document> | NullToken
Description
Returns the first accessible token document that matches the predicate function. The predicate function must return a Boolean.
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
predicate |
An anonymous function that compares values in each |
Examples
{
id: "371233004820889634",
coll: Token,
ts: Time("2023-07-25T14:10:32.165Z"),
document: People.byId("370723013175279650")
}
Is this article helpful?
Tell Fauna how the article can be improved:
Visit Fauna's forums
or email docs@fauna.com
Thank you for your feedback!