detect-jxa

0.0.1 • Public • Published

detect-jxa

This is a simple micro-package to provide a function to determine if the current JavaScript environment is the JavaScript for Automation (‘JXA’) environment provided on Mac OS X / macOS versions 10.10 (‘Yosemite’) and later. (See also: JXA-Cookbook)

This allows you to branch behaviour depending on whether JXA's globals will be available or not:

const onJXA = require('detect-jxa')()
 
if (onJXA)
   require('jxa-async/shim')

Installation

  • DOCME

{{#function name="detectJXA"}} {{>header~}} {{>body~}} {{/function}}

License

© 2017 ELLIOTTCABLE. detect-jxa is available under the ISC license.

Package Sidebar

Install

npm i detect-jxa

Weekly Downloads

2

Version

0.0.1

License

ISC

Last publish

Collaborators

  • elliottcable