Registry / serialization / russian-js-transpiler

russian-js-transpiler

JSON →
library1.0.1jsnpmunverified

A transpiler (v1.0.1) that converts Russian-language JavaScript-like code into standard JavaScript, enabling Russian speakers to write programs using native keywords. Supports modern JS features including variables, control flow, loops, functions, classes, error handling, modules, and template literals. Provides a CLI tool and programmatic API. Extensible architecture with full TypeScript support. Requires Node >=14.0.0. Differentiators: comprehensive mapping of Russian keywords to JS, support for standard JS features, and TypeScript-first development.

npm install russian-js-transpiler
INSTALL
IMPORT
SIG · RUSSIAN-JS-TRANSPI
R
russian-js-transpiler
serializationjavascriptv1.0.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

transpile
import { transpile } from 'russian-js-transpiler'
const transpile = require('russian-js-transpiler').transpile
ESM-only; named import, not default.
default
import rjs from 'russian-js-transpiler'
import { default as rjs } from 'russian-js-transpiler'
Default export is a transpiler instance with a .transpile method and other utilities.
compileFile
import { compileFile } from 'russian-js-transpiler'
Named export for compiling from file path.

Demonstrates basic transpilation using the named `transpile` function.

import { transpile } from 'russian-js-transpiler'; const russianCode = ` функция приветствовать(имя) { вернуть "Привет, " + имя + "!"; } `; const jsCode = transpile(russianCode); console.log(jsCode); // Output: // function приветствовать(имя) { // return "Привет, " + имя + "!"; // }
rjs --version
Debug
Known issues
gotchaRussian keywords are case-sensitive; 'Переменная' (capitalized) will not be recognized as 'переменная'.
fix
Always use lowercase Russian keywords as shown in documentation.
affects: >=1.0.0
gotchaThe default export is an object, not a function. Attempting to call `rjs(code)` will throw 'rjs is not a function'.
fix
Use named import `{ transpile }` or access `rjs.transpile`.
affects: >=1.0.0
breakingVersion 1.0.0 removed support for the `translator` function; use `transpile` instead.
fix
Replace `translator(code)` with `transpile(code)`.
affects: >=1.0.0 <1.0.1
deprecatedThe `--output` CLI flag is deprecated in v1.0.1; use `--out` instead.
fix
Use `rjs -i input.rjs -o output.js`
affects: 1.0.1
Errors
Common errors & fixes
Error: Cannot find module 'russian-js-transpiler'
Package not installed or not in node_modules.
fix
Run `npm install russian-js-transpiler` or check your import path.
TypeError: rjs is not a function
Default import was used but called directly instead of accessing `.transpile`.
fix
Use `import { transpile } from 'russian-js-transpiler'` or call `rjs.transpile(code)`.
SyntaxError: Unexpected token 'переменная'
Trying to run .rjs file directly with Node.js instead of transpiling first.
fix
Transpile the .rjs file using `rjs -i file.rjs -o file.js` then run `node file.js`.
Upgrade
Version history
1.0.1latest on npm
Audit
Dependencies
commanderrequiredCLI argument parsing
Agent activity
2 hits · last 30 days
node
2
Resources
russian-js-transpiler — npm install russian-js-transpiler · libregistry