Skip to content

[Joke Language] Write JavaScript without pressing the Shift key.

License

Notifications You must be signed in to change notification settings

otoneko1102/NoShift.js

Repository files navigation

npm license

NoShift.js

NoShift.js

English | 日本語

A joke language that lets you write JavaScript without pressing the Shift key.


Typing shifted symbols (!, ", (, ), {, } …) is tiring.
NoShift.js replaces every shift-required symbol with a ^-prefixed sequence, so you can write JavaScript using only unshifted keys.
.nsjs files compile directly to plain JavaScript via the nsc CLI.


Symbol Map

This symbol mapping is based on the NoShift.js developer's keyboard (JIS layout).

Developer's Keyboard

NoShift JS NoShift JS
^1 ! ^^ ~
^2 " ^\ |
^3x X (capitalize) ^@ `
^4 $ ^[ {
^5 % ^] }
^6 & ^; +
^7 ' ^: *
^8 ( ^, <
^9 ) ^. >
^- = ^/ ?
^0 ^ (XOR)

Template expression: ^4^[${


Quick Start

Global Install

npm install -g noshift.js@latest
nsc create my-project

Local Install

npm install -D noshift.js@latest
npx nsc create my-project

Example

// src/index.nsjs
const name ^- ^2^3no^3shift.js^2;
console.log^8^2^3hello from ^2 ^; name ^; ^2!^2^9;

Compiles to:

const name = "NoShift.js";
console.log("Hello from " + name + "!");

Programmatic API

You can also use NoShift.js as a library in your code:

// ESM
import { compile } from "noshift.js";

// CJS
const { compile } = require("noshift.js");

const result = compile('console.log^8^2^3hello^2^9;');
console.log(result.outputText);
// => console.log("Hello");

Links

npm noshift.js
Linter @noshift.js/lint
VS Code NoShift.js - Marketplace
Website noshift.js.org
Repository github.com/otoneko1102/NoShift.js

License

MIT © otoneko.

Releases

No releases published

Sponsor this project

  •  

Packages

No packages published

Contributors 2

  •  
  •