Check JS minify or not programmatically in Magento 2.

Magento 2 has native feature to JS Minify from the Configuration Setting admin panel.

To Minify JavaScript files in Magento 2 Via admin panel,
Go To Admin panel,
Click Stores -> Settings -> Configuration from the left sidebar.
Select Developer Tab under the Advanced from the left sidebar,
Open the JavaScript Settings section,
Minify Javascript file to Yes,
Click on Save Config.

You can check it programmatically,

Use Class, Magento\Framework\View\Asset\Minification to check minify js or not.

Call from the template or any PHP class,
echo $isMinify = $this->isJsMinifyEnabled();

Output:
Boolean