A Swift to JavaScript transpiler written in JavaScript, version 0.1.1 (early development). It supports basic Swift data types, collection types, operators, control flow, and functions. The project provides a CLI tool and API, using Escodegen for code generation. It is in active development with limited language coverage and no recent updates.
npm install shift.jsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Transpile a simple Swift function to JavaScript using Shift.js API.
Consider using other transpilers like Swiftify or manual migration.
Use Node 4.x or a compatible runtime; upgrade not recommended.
Stick to basic Swift constructs or transpile manually.
Audit dependencies or use isolated environment.
Run 'npm install shift-js' or install globally with 'npm install -g shift.js' (note the dot).
Use 'const shift = require('shift-js'); const result = shift.transpile(code);'Remove type annotations from Swift code before transpiling.
No dependency data recorded yet.