is_page_template() written in jquery/javascript

Well, yes, in WordPress, different templates have a different body class name. If you inspect the body classes on a specific page in WordPress, there should be a body class page. You can detect the template by checking if the class exists like so:

jQuery(document).ready(function($){
    if ( $('body').hasClass('page')) {
        // add your logic here
    }
});