How to access front matter from a javascript file without exposing it in the HTML

Hi, in my front matter, I have public facing data, but also private data that should not be attached to the DOM/HTML.

Is there a way to access this private data directly inside a separate .js file without attaching it to the DOM?