isAnonymous

Check whether the user is anonymous.

This method checks whether the current session is anonymous.

It is a shorthand for calling the user.isAnonymous method.

Signature

This method has the following signature:

croct.isAnonymous(): boolean

The return is true if the user is anonymous, false otherwise.

Example

Here is a basic example of how to use this method:

import croct from '@croct/plug';
console.log(croct.isAnonymous()); // true
croct.identify('00000000-0000-0000-0000-000000000000');
console.log(croct.isAnonymous()); // false