js-brackets

1.0.0 • Public • Published

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!

Package Sidebar

Install

npm i js-brackets

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

6.81 kB

Total Files

4

Last publish

Collaborators

  • manucoding