What is line referencing? "est: isTouch // WEB.utils.tactus.est();"

Regarding the code below,  from this article https://blogs.perficient.com/perficientdigital/2017/11/21/detecting-the-use-of-a-touch-screen/  but I'm confused with this return code:
    // Reveal the methods
    return {
        isTouch: isTouch, // WEB.utils.tactus.isTouch();
        est: isTouch // WEB.utils.tactus.est();
    };

Open in new window

I'm confused what "est: isTouch // WEB.utils.tactus.est();"  (line 15 below)  is referencing and why both methods are revealed. They both return the same value.
var WEB = WEB || {};
WEB.utils = WEB.utils || {};
// Begin Tactus
WEB.utils.tactus = (function() {
    // Set variable to cache the results of isTouch
    var _isTouchCached = null;
    // Set a variable detecting the existence of touch events
    var _hasEvents = 'ontouchstart' in window || navigator.msMaxTouchPoints > 0;
    // Set a flag variable to keep track of if the mouse/touch event listeners were already added
    var _listenersAdded = false;
    // Call the isTouch method initially
    isTouch();
    // Reveal the methods
    return {
        isTouch: isTouch, // WEB.utils.tactus.isTouch();
        est: isTouch // WEB.utils.tactus.est();
    };
    // Default isTouch check
    function isTouch() {
        // If the cached variable already has a value
        if (_isTouchCached !== null) {
            // Just return the cached variable and don't bother checking again
            return _isTouchCached;
        }
        // If the browser supports touch events
        if (_hasEvents) {
            // If the mouse/touch event listeners haven't been added yet
            if (!_listenersAdded) {
                // Add the mouse/touch event listeners
                _addListeners();
            }
            // If the browser doesn't support touch events
        } else {
            // Set the cached variable to false
            _isTouchCached = false;
        }
        // Return the current value of the cached variable
        return _isTouchCached;
    }
    // The function to add the mouse/touch event listeners
    function _addListeners() {
        // If the mouse/touch event listeners haven't been added yet
        if (!_listenersAdded) {
            // Add the mouse event listener
            window.addEventListener('mousemove', _checkForMouse);
            // Add the touch event listener
            window.addEventListener('touchstart', _checkForTouch);
        }
        // Set the flag to true to indicate that the mosue/touch event listeners have been added
        _listenersAdded = true;
    }
    // The mouse event listener
    function _checkForMouse() {
        // Set the cached variable to false
        _isTouchCached = false;
        // Remove the mouse/touch event listeners
        _removeListeners();
    }
    // The touch event listener
    function _checkForTouch() {
        // Set the cached variable to true
        _isTouchCached = true;

        // Remove the mouse/touch event listeners
        _removeListeners();
    }
    // The function to remove the mouse/touch event listeners
    function _removeListeners() {
        // Remove the mouse event listener
        window.removeEventListener('mousemove', _checkForMouse);
        // Remove the touch event listener
        window.removeEventListener('touchstart', _checkForTouch);
    }
}());

Open in new window

894359Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

leakim971PluritechnicianCommented:
this :
    return {
        isTouch: isTouch, // WEB.utils.tactus.isTouch();
        est: isTouch // WEB.utils.tactus.est();
    };

Open in new window

same as :
    return { isTouch: isTouch,  est: isTouch };

Open in new window

or again :
   var obj = { isTouch: isTouch,  est: isTouch };
   return obj;

Open in new window


so you can use WEB.utils.tactus.isTouch or WEB.utils.tactus.est which are the same reference to the function isTouch inside the namespace WEB.utils.tactus
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Juan OcasioApplication DeveloperCommented:
Both are referring to the isTouch function. So the isTouch function will be called with either:

WEB.utils.tactus.isTouch() or WEB.utils.tactus.est()
0
894359Author Commented:
So why do this? IS there any advantage?
0
Juan OcasioApplication DeveloperCommented:
No advantage. May be for compatibility so it doesn’t break anything that’s out there
0
leakim971PluritechnicianCommented:
a shortcut...? only Bryce Taylor know...
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.