ArabJs Transpiler

raw JSON →
0.0.6 verified Fri May 01 auth: no javascript abandoned

ArabJs is a JavaScript transpiler that converts Arabic-script code into standard JavaScript, enabling programming in Arabic. Current version is 0.0.6 (released 2020), with low release cadence. Key differentiator: allows writing JavaScript-like code using Arabic keywords (e.g., 'داله' for function, 'اطبع' for print). It is a proof-of-concept tool with limited practical use, no TypeScript support, and no active development.

error SyntaxError: Cannot use import statement outside a module
cause Running ESM code in a CommonJS environment.
fix
Add 'type': 'module' to package.json or use .mjs extension.
error TypeError: arabJs is not a function
cause Using arabJs as a function directly instead of calling arabJs.run().
fix
Use arabJs.run(code) instead of arabJs(code).
gotcha Package uses ESM only; CommonJS require will fail.
fix Use import syntax instead of require.
deprecated Package appears abandoned; no updates since 2020.
fix Consider using alternatives or avoid for production.
npm install arabjs
yarn add arabjs
pnpm add arabjs

Shows how to use ArabJs to run a simple Arabic script that defines a function and prints the result.

import arabJs from 'arabjs';

const code = `
 داله جمع(س,ص) {
   الجواب س + ص
 }
 لنفرض النتيجة = جمع(2,3)
 اطبع.نص(النتيجة)
`;

arabJs.run(code);
// Output: 5