bhauji-js: Bhojpuri Programming Language Transpiler

raw JSON →
1.5.0 verified Fri May 01 auth: no javascript

A novelty transpiler and CLI tool that converts Bhojpuri-language syntax into JavaScript. Version 1.5.0 provides a CLI runner for .bj files, translating desi keywords like 'kaha_bhauji' and 'batayi' into console.log and let respectively. It supports conditionals, loops, arrays, functions, and more. Differentiated by its humorous, cultural approach; not intended for serious production use. Release cadence is irregular, with occasional updates.

error Error: Cannot find module 'bhauji-js'
cause Package not installed or global installation missing.
fix
Run 'npm install -g bhauji-js' or 'npm install bhauji-js'.
error SyntaxError: Unexpected identifier 'naam'
cause Bhojpuri syntax not recognized; likely a .js file used instead of .bj.
fix
Ensure file extension is .bj and run via 'bhauji <file>.bj'.
error Error: run is not a function
cause Incorrect import; default import used but run is named export.
fix
Use 'import { run } from 'bhauji-js''.
gotcha Bhojpuri syntax does not map 1:1 to JavaScript; some edge cases may behave unexpectedly.
fix Test thoroughly and refer to the command table in the README.
gotcha The package is a novelty tool; not designed for production use.
fix Use standard JavaScript for serious projects.
breaking In version 1.5.0, the default export 'bhauji' was removed in favor of named exports only.
fix Change 'import bhauji from...' to 'import { bhauji } from...'.
npm install bhauji-js
yarn add bhauji-js
pnpm add bhauji-js

Demonstrates transpiling a Bhojpuri snippet with variable declaration and console output.

import { run } from 'bhauji-js';

const input = `
kaisan bhauji;
batayi naam = "Duniya";
kaha_bhauji("Namaste " + naam);
`;

const result = run(input);
console.log(result);
// Expected output: Namaste Duniya