nobraces
v1.0.0
Published
cuz i hate braces
Downloads
1
Readme
nobraces
Why?
Because i hate them. I think we get better readable code if we don't use braces.
Pros
- no BRACESS (hell yeah)
- Can disable auto brace system with adding +,-,*,/,\ at the end of line. if you use '' nobraces won't print '' but other letters will be printed.
Cons
- I didn't do enough tests. I will do more stress test.
- Probably some comments causing mistakes. We will handle it.
How?
The Word that you looking for is EASY;
// define me
var nobraces = require("nobraces");
// execute file
nobraces.feval(__dirname + "/myfile.js");
Nobracing
The idea comes from tabs. When you tab 1 right, nobraces understands there must be a brace..
function hello()
console.log("this is an example");
return
amazing: function()
return "life is" +
"interesting";
hello().amazing();
// if you put + end of line, nobraces will be understand "it should same" then line removes tabs.
Functions
var mynewstring = nobraces("nobraced string")
Just simply nobraces the string. It doesn't reads from any file. It's also Sync.
var evalresults = nobraces.eval("nobraced string")
Nobraces the string and evals it. Same again It doesn't reads from any file. It's also Sync too.
var mynewstring = nobraces.fileSync(__dirname + "/myfile.js")
Reads file nobraces it. It's also Sync.
nobraces.file(__dirname + "/myfile.js", function(mynewstring) {})
Reads file nobraces it. It's Async.
var mynewstring = nobraces.fevalSync(__dirname + "/myfile.js")
Reads file nobraces it and evals it. It's Sync.
nobraces.feval(__dirname + "/myfile.js", function(evalresults) {})
Reads file nobraces it and evals it. It's Async.