jxa-lib

General library for AppleScript (JXA).

https://github.com/tatsh/jxa-lib

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.5%) to scientific vocabulary

Keywords

applescript jxa macos typescript
Last synced: 6 months ago · JSON representation ·

Repository

General library for AppleScript (JXA).

Basic Info
Statistics
  • Stars: 36
  • Watchers: 3
  • Forks: 3
  • Open Issues: 0
  • Releases: 0
Topics
applescript jxa macos typescript
Created over 7 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog Contributing Funding License Citation Codeowners Security

README.md

Library for JXA

NPM Version GitHub tag (with filter) License GitHub commits since latest release (by SemVer including pre-releases) CodeQL QA Tests Coverage Status GitHub Pages pre-commit NPM Downloads Stargazers

@Tatsh Mastodon Follow

This is a helper library for AppleScript in JavaScript that works on macOS 10.10 and above. To properly use this, a bundler must be used such as Webpack. It is recommended to install jxa-types as well.

This repository also demonstrates how to write tests mocking the JXA environment. See the *.test.ts files in src.

Example use

```typescript import { FileManager } from 'jxa-lib';

const fm = new FileManager(); let attr; try { attr = fm.attributesOfItem('/some-file'); } catch (e) { // Instead of having to pass &error (Ref object) like in Objective-C, // an exception is thrown console.log('Maybe /some-file does not exist?'); }

// attr type is FileAttributes or undefined, which does not have prefixes removed if (attr) { console.log(attr.NSFileGroupOwnerAccountID); // string console.log(attr.NSFileModificationDate); // Date object } ```

Example with C functions

You do not have to use ObjC.import() because all modules will do this on their own.

```typescript import { stdlib, string } from 'jxa-lib';

const size = 32; const buf = stdlib.malloc(size); // returns Ref string.memset(buf, 0, size); for (let i = 0, c = 'a'.charCodeAt(0); i < size; i++, c++) { buf[i] = c; }

const asciiC = 'c'.charCodeAt(0); const asciiD = 'd'.charCodeAt(0);

// memchr() returns Ref or Ref to NULL const result = string.memchr(buf, asciiC, size); if (result[0]) { // this will be asciiC or null/undefined console.log(result[0] === asciiC); // true console.log(result[1] === asciiD); // true

// Getting result[30] or above is not defined behaviour }

stdlib.free(result);

// Do not print the result of the last expression stdlib.exit(0); ```

Owner

  • Login: Tatsh
  • Kind: user

Citation (CITATION.cff)

authors:
  - family-names: 'Udvare'
    given-names: 'Andrew'
cff-version: '1.2.0'
date-released: '2025-07-09'
message: 'If you use this software, please cite it as below.'
title: 'jxa-lib'
version: '0.1.7'

GitHub Events

Total
  • Watch event: 1
  • Delete event: 15
  • Issue comment event: 1
  • Push event: 33
  • Pull request event: 32
  • Create event: 24
Last Year
  • Watch event: 1
  • Delete event: 15
  • Issue comment event: 1
  • Push event: 33
  • Pull request event: 32
  • Create event: 24

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 3
  • Total pull requests: 40
  • Average time to close issues: 12 days
  • Average time to close pull requests: 8 days
  • Total issue authors: 3
  • Total pull request authors: 3
  • Average comments per issue: 2.0
  • Average comments per pull request: 0.1
  • Merged pull requests: 30
  • Bot issues: 0
  • Bot pull requests: 38
Past Year
  • Issues: 0
  • Pull requests: 20
  • Average time to close issues: N/A
  • Average time to close pull requests: about 4 hours
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.15
  • Merged pull requests: 12
  • Bot issues: 0
  • Bot pull requests: 20
Top Authors
Issue Authors
  • Tatsh (1)
  • AlJohri (1)
  • Artoria2e5 (1)
Pull Request Authors
  • dependabot[bot] (35)
  • pje (1)
  • Artoria2e5 (1)
Top Labels
Issue Labels
bug (1)
Pull Request Labels
dependencies (35) javascript (15) github_actions (2)

Packages

  • Total packages: 1
  • Total downloads:
    • npm 827 last-month
  • Total dependent packages: 1
  • Total dependent repositories: 1
  • Total versions: 8
  • Total maintainers: 1
npmjs.org: jxa-lib

General library for AppleScript (JXA).

  • Versions: 8
  • Dependent Packages: 1
  • Dependent Repositories: 1
  • Downloads: 827 Last month
Rankings
Dependent repos count: 10.4%
Dependent packages count: 21.1%
Average: 29.5%
Downloads: 57.1%
Maintainers (1)
Last synced: 6 months ago

Dependencies

package-lock.json npm
  • 109 dependencies
package.json npm
  • @types/ramda ^0.27.30 development
  • ts-loader ^8.0.2 development
  • typescript ^3.8.3 development
  • webpack ^5.45.1 development
  • ramda ^0.26.1