All Projects → sindresorhus → is-jxa

sindresorhus / is-jxa

Licence: MIT license
Check if your code is running in a JXA environment

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects

Projects that are alternatives of or similar to is-jxa

AppleScriptive
Functional AppleScripts operating out of Keyboard Maestro, Alfred and Automator to optimise productivity.
Stars: ✭ 44 (+57.14%)
Mutual labels:  jxa, javascript-for-automation
QLScpt
A macOS QuickLook generator for .scpt files (both AppleScript and JavaScript).
Stars: ✭ 22 (-21.43%)
Mutual labels:  javascript-for-automation
sublime-applescript
AppleScript command completions, build system and useful snippets. Supports editing binary scripts
Stars: ✭ 50 (+78.57%)
Mutual labels:  jxa
Jxa Cookbook
Cookbook for JavaScript for Automation in Mac OS X Yosemite
Stars: ✭ 2,603 (+9196.43%)
Mutual labels:  jxa
prelude-jxa
Generic functions for macOS and iOS scripting in Javascript – function names as in Hoogle
Stars: ✭ 51 (+82.14%)
Mutual labels:  jxa
node-jxa
Use your favorite node.js modules (and JS editor) for your Javascript OSX automation scripts
Stars: ✭ 52 (+85.71%)
Mutual labels:  jxa
automating-macOS-with-JXA-presentation
Slides & sample code from the "Automating macOS with Javascript for Automation" talk, given at the MelbJS meetup
Stars: ✭ 40 (+42.86%)
Mutual labels:  jxa
dotfiles
Dotfiles. Mac and *nix. Handy scripts, configurations for bash, zsh, git, asdf, Sublime Text, Karabiner-Elements, BetterTouchTool and more.
Stars: ✭ 15 (-46.43%)
Mutual labels:  jxa

is-jxa

Check if your code is running in a JXA environment

JXA is JavaScript for Automation on macOS.

Install

npm install is-jxa

Usage

import isJxa from 'is-jxa';

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

You need to transpile the code for an JXA environment as it does not support ESM.

Related

  • run-jxa - Run JXA code and get the result
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].