How to programmatically check on the frontend checkout screen client side (with JavaScript) whether the customer is authenticated (logged in)?

Method 1.

How is the isLoggedIn() method of the «Magento_Customer/js/model/customer» object implemented and used?

Mehod 2.

How is the window.isCustomerLoggedIn implemented and used?