JavaScript Brackets
Allows you to write any JavaScript code by only using square brackets []
.
Getting started
Install the package with npm:
$ npm install js-brackets
Or simply clone this repository locally:
$ git clone https://github.com/ManuCoding/brackets
Example
nodejs
const brackets=require("js-brackets");
console.log(brackets(`console.log("Hello brackets!")`));
// > [][[][[]]][[][[][[]]]][[][[]]][[][[]]][[][[]]][[][[][[]]]]
// ... [[][[][[]]]][[[]][[][[]]]][[[][[]]][[][[]]]]
html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JavaScript but only square brackets</title>
<script src="brackets.js"></script>
</head>
<body>
<script>
console.log(brackets(`console.log("Hello brackets!")`));
</script>
</body>
</html>
Usage
Simply include the library and you can execute your code with brackets!
require("js-brackets");
[][[][[]]][[][[][[]]]][[][[]]][[][[]]][[][[]]][[][[][[]]]][[][[][[]]]]
[[[]][[][[]]]][[][[][[]]]][[][[]]][[][[][[]]]][[][[][[]]]][[][[][[]]]]
[[][[][[]]]][[[]][[][[]]]][[][[][[]]]][[][[]]][[][[][[]]]][[][[][[]]]]
[[][[][[]]]][[][[]]][[[]][[][[]]]][[][[][[]]]][[][[][[]]]][[][[]]]
[[][[]]][[][[][[]]]][[][[][[]]]][[[]][[][[]]]][[][[][[]]]][[][[]]]
[[][[][[]]]][[][[][[]]]][[][[][[]]]][[][[][[]]]][[[]][[][[]]]][[][[][[]]]]
[[][[]]][[][[][[]]]][[][[][[]]]][[][[]]][[][[]]][[[]][[][[]]]][[][[][[]]]]
[[][[]]][[][[]]][[][[][[]]]][[][[]]][[][[][[]]]][[[]][[][[]]]][[][[]]]
[[][[][[]]]][[][[][[]]]][[][[][[]]]][[][[]]][[[]][[][[]]]][[][[][[]]]]
[[][[]]][[][[][[]]]][[][[][[]]]][[][[]]][[][[]]][[[]][[][[]]]][[][[][[]]]]
[[][[]]][[][[][[]]]][[][[][[]]]][[][[][[]]]][[][[][[]]]][[[]][[][[]]]]
[[][[][[]]]][[][[]]][[][[]]][[][[][[]]]][[][[][[]]]][[][[][[]]]]
[[[]][[][[]]]][[][[]]][[][[][[]]]][[][[]]][[][[]]][[][[]]][[[]][[][[]]]]
[[][[]]][[][[]]][[][[]]][[][[][[]]]][[][[]]][[[]][[][[]]]][[][[]]][[][[]]]
[[][[][[]]]][[][[]]][[][[]]][[][[]]][[[]][[][[]]]][[][[][[]]]][[][[]]]
[[][[]]][[][[][[]]]][[][[]]][[][[][[]]]][[[]][[][[]]]][[][[][[]]]][[][[]]]
[[][[][[]]]][[][[][[]]]][[][[]]][[][[]]][[[]][[][[]]]][[][[][[]]]][[][[]]]
[[][[][[]]]][[][[][[]]]][[][[]]][[][[]]][[[]][[][[]]]][[][[][[]]]][[][[]]]
[[][[][[]]]][[][[][[]]]][[][[][[]]]][[][[][[]]]][[[]][[][[]]]][[][[]]]
[[][[]]][[][[]]][[][[]]][[][[]]][[[]][[][[]]]][[][[][[]]]][[][[]]][[][[]]]
[[][[]]][[][[][[]]]][[][[]]][[[]][[][[]]]][[][[][[]]]][[][[][[]]]][[][[]]]
[[][[]]][[][[][[]]]][[][[]]][[[]][[][[]]]][[][[][[]]]][[][[]]][[][[]]]
[[][[]]][[][[]]][[][[][[]]]][[[]][[][[]]]][[][[][[]]]][[][[]]][[][[]]]
[[][[]]][[][[][[]]]][[][[][[]]]][[[]][[][[]]]][[][[][[]]]][[][[]]]
[[][[][[]]]][[][[]]][[][[][[]]]][[][[][[]]]][[[]][[][[]]]][[][[][[]]]]
[[][[]]][[][[]]][[][[][[]]]][[][[]]][[][[][[]]]][[[]][[][[]]]][[][[][[]]]]
[[][[][[]]]][[][[]]][[][[][[]]]][[][[]]][[][[]]][[[]][[][[]]]][[][[][[]]]]
[[][[][[]]]][[][[]]][[][[]]][[][[][[]]]][[][[][[]]]][[[]][[][[]]]][[][[]]]
[[][[]]][[][[]]][[][[]]][[][[][[]]]][[[]][[][[]]]][[][[]]][[][[]]][[][[]]]
[[][[][[]]]][[][[]]][[[]][[][[]]]][[][[]]][[][[][[]]]][[][[]]][[][[]]]
[[][[][[]]]][[[]][[][[]]]][[[][[]]][[][[]]]]
// Will output: Hello brackets!