
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
osascript-tag
Advanced tools
A JavaScript template literal tag that executes AppleScript and other OSA languages
osascript-tag
osascript-tag
is a JavaScript template literal tag that executes AppleScript and other OSA languages.
Every time I get a script it's a matter of trying to know what I could do with it. I see colors, imagery. It has to have a smell. It's like falling in love. You can't give a reason why.
— Paul Newman
To get started, add osascript-tag
to your project:
npm i --save osascript-tag
⚠️ Warning: This package is still in beta and in active development. The API is likely to change in future releases.
const osascript = require('osascript-tag');
async function main() {
try {
const result = await osascript`
tell application "iTunes"
get properties of current track
end tell
`;
console.log(result);
} catch (error) {
console.log(error);
}
}
const osascript = require('osascript-tag');
async function main() {
try {
const result = await osascript.jxa({ flags: 's', json: true })`
const app = Application.currentApplication();
app.includeStandardAdditions = true;
const lang = app.chooseFromList(
["applescript", "javascript", "typescript"],
{
withPrompt: "What is your favorite language?",
multipleSelectionsAllowed: true
}
);
lang;
`;
console.log(result);
} catch (error) {
console.log(error);
}
}
MIT
FAQs
A JavaScript template literal tag that executes OSA scripts (AppleScript, JavaScript, etc.)
The npm package osascript-tag receives a total of 20 weekly downloads. As such, osascript-tag popularity was classified as not popular.
We found that osascript-tag demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.