Registry / serialization / banglascript-transpiler

banglascript-transpiler

JSON →
library1.0.0jsnpmunverified

A toy transpiler that converts BanglaScript (a beginner-friendly programming language using Bangladeshi GEZ-Z slang keywords) into JavaScript. Version 1.0.0 is the initial release. It translates BanglaScript keywords like 'bro' (let), 'funde' (function), 'jodi' (if), 'bolchi' (console.log) into standard JavaScript. Primarily educational or novelty use; not intended for production. No regular release cadence. Differentiator: it makes programming accessible to Bengali speakers by using localized keywords.

npm install banglascript-transpiler
INSTALL
IMPORT
SIG · BANGLASCRIPT-TRANS
B
banglascript-transpiler
serializationjavascriptv1.0.0
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.

Default import of the transpiler function
import transpile from 'banglascript-transpiler';
const transpile = require('banglascript-transpiler');
Package might not export CommonJS; check package.json for module type. Prefer ESM import.
CLI usage via npx
npx banglascript input.bns output.js
banglascript input.bns output.js (if not installed globally)
CLI is 'banglascript' but npm package is 'banglascript-transpiler'. Use npx or global install.
Programmatic transpile API
import transpile from 'banglascript-transpiler'; const jsCode = transpile(banglaScriptCode);
The API function name and parameters are assumed based on typical transpilers. Verify with package docs.

Transpile BanglaScript code to JavaScript using the programmatic API and log the result.

const fs = require('fs'); const transpile = require('banglascript-transpiler'); const inputCode = ` bro taka = 100; funde discount(taka) { jodi (taka > 500) { bolchi("Boro taka:", taka - 50); } naile { bolchi("Chhoto taka:", taka - 10); } oi mama taka; } discount(taka); `; const outputCode = transpile(inputCode); console.log(outputCode); // Expected JS output includes variable declarations and function with if-else and console.log
banglascript --version
Debug
Known issues
breakingThe CLI command is 'banglascript', not 'banglascript-transpiler'. Running 'banglascript-transpiler input.bns' will fail.
fix
Use 'npx banglascript' or install globally with 'npm install -g banglascript-transpiler' and run 'banglascript'.
affects: >=1.0.0
gotchaThe programmatic API is not documented; the module may not export a function as expected. Users may have to inspect the package internals.
fix
Import the transpiler function: import transpile from 'banglascript-transpiler' or use CLI instead.
affects: >=1.0.0
gotchaBanglaScript is a toy language; it is not suitable for production. Using it in serious projects may lead to unexpected behavior or lack of support.
fix
Use for learning or fun only. Do not rely on it for critical applications.
affects: >=1.0.0
deprecatedThe package uses CommonJS require in examples but may be ESM-only. Using require may fail.
fix
Check package.json for 'type': 'module'. Use ESM import syntax.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'banglascript-transpiler'
Package not installed or wrong import path.
fix
Run 'npm install banglascript-transpiler' and ensure correct import: import transpile from 'banglascript-transpiler'
bash: banglascript: command not found
CLI binary not in PATH; package not installed globally.
fix
Install globally: 'npm install -g banglascript-transpiler'. Or use npx: 'npx banglascript input.bns output.js'
TypeError: transpile is not a function
Default import may not yield a function; module might export differently.
fix
Check the actual export: e.g., import * as transpiler from 'banglascript-transpiler'. Refer to package source.
Upgrade
Version history
1.0.0latest on npm
Audit
Dependencies
commanderrequiredUsed for CLI command parsing in the transpiler
Agent activity
17 hits · last 30 days
node
14
OpenAI (training)
1
Resources
banglascript-transpiler — npm install banglascript-transpiler · libregistry