JavaScwipt

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

JavaScwipt is an esoteric, UwU-ified version of JavaScript that replaces standard keywords with cutesy alternatives (e.g., `var` → `vawar`, `let` → `nya`, `const` → `fowever`, `function` → `fuwunction`, `return` → `bacc`, `class` → `cwass`). It uses acornjs and escodegen to transpile `.jscwipt` source files into plain JavaScript (`.js` or `.mjs`). The npm package provides both a library API and the `jswc` CLI tool. Version 1.0.10 is the current stable release; the project is maintained as a novelty/educational tool. Unlike standard JavaScript, JavaScwipt forces the use of replaced keywords and reserves original JS keywords, meaning you must write `nya x = 1` instead of `let x = 1`. The tool is not meant for production use but for fun, learning transpiler internals, or novelty code.

error Error: Cannot find module './src/...' or "No .jscwipt files found"
cause .jscwipt files are not inside a 'src' directory, or the CLI is run from the wrong working directory.
fix
Ensure all .jscwipt files are in a 'src' folder relative to where you run the 'jswc' command.
error SyntaxError: Unexpected token (1:4)
cause Original JavaScript keyword used in .jscwipt file (e.g., 'let x = 1;')
fix
Replace with UwU equivalent: 'nya x = 1;'
error TypeError: (intermediate value) is not a function
cause Using an import pattern like `const jswc = require('javascwipt'); jswc.compile(...)` and calling default export as function.
fix
Use named import: import { compile } from 'javascwipt'; compile(...)
error ReferenceError: fowever is not defined
cause Trying to run a .jscwipt file directly in Node.js without transpiling.
fix
Compile first with 'jswc' to produce .js/.mjs, then run the output file.
error SyntaxError: Unexpected token '.' (maybe caused by acorn version mismatch?)
cause Outdated version of JavaScwipt or incompatible acorn version when using modern JS syntax like optional chaining.
fix
Update to latest JavaScwipt (npm update javascwipt) and ensure Node.js version >= 14.
breaking Original JavaScript keywords (let, const, var, function, etc.) are treated as syntax errors inside .jscwipt files.
fix Use UwU replacements: let → nya, const → fowever, var → vawar, function → fuwunction, return → bacc, class → cwass, extends → extwends, this → kohai, super → senpai, if → iwf, else → ewse, for → fwor, while → duwuring, do → dowo, continue → continuwu, break → bweak, switch → mwatch, case → cwase, default → nowormal, true → twue, false → fawse, null → nuwull.
gotcha .jscwipt files must be placed in a directory named 'src' relative to where you run the jswc command; otherwise compilation fails with a file-not-found error.
fix Create a 'src' folder and put all .jscwipt files inside it.
gotcha The CLI's default output is a .js file (CommonJS). To run with modern Node.js (ESM), you must use 'jswc mjs' to produce a .mjs file.
fix Use 'jswc mjs' for ESM output, then run with 'node src/*.mjs'. For CommonJS, 'jswc' produces .js files.
deprecated No versions have been deprecated, but the project is a novelty tool; breaking changes may occur without notice if underlying dependencies (acorn, escodegen) update.
fix Pin versions in package.json if using programmatically. Not recommended for production.
gotcha The library's named exports may not include a default export; attempting import javascwipt from 'javascwipt' will result in undefined.
fix Use named imports: import { compile } from 'javascwipt'
npm install javascwipt
yarn add javascwipt
pnpm add javascwipt

Creates a .jscwipt file with UwU syntax, compiles it to .js/.mjs using jswc CLI, and runs with Node.js. Also shows programmatic compile usage.

// Install globally: npm install -g javascwipt
// Create src/test.jscwipt with:
/*
nya x = 'Hello World!';
console.log(x);
*/
// Run in terminal:
// jswc        → produces src/test.js
// jswc mjs    → produces src/test.mjs
// node src/test.mjs
// Output: Hello World!

// Programmatic usage:
// import { compile } from 'javascwipt';
// const compiled = compile("nya x = 1; bacc x * 2;");
// console.log(compiled); // 'let x = 1; return x * 2;'