is-jxa

Check if your code is running in a JXA environment

Usage no npm install needed!

<script type="module">
  import isJxa from 'https://cdn.skypack.dev/is-jxa';
</script>

README

is-jxa Build Status

Check if your code is running in a JXA environment

JXA is JavaScript for Automation on macOS.

Install

$ npm install is-jxa

Usage

const isJxa = require('is-jxa');

if (isJxa) {
    // For example, polyfill something here when it's in a JXA environment
}

Related

  • run-jxa - Run JXA code and get the result

License

MIT © Sindre Sorhus