Comparing version 0.0.3 to 0.0.4
12
index.js
// Export reader | ||
exports.read = function(input, opts){ | ||
opts = opts || {}; | ||
opts['format'] = !('format' in opts)? | ||
' ' : opts.format; | ||
return compile(opts)(parse(input)); | ||
@@ -14,14 +12,14 @@ }; | ||
var compile = exports.compile = function(flags, il, debug){ | ||
flags = flags || { format: ' ' }; | ||
flags = flags || { tab: ' ' }; | ||
il = il || 0; | ||
var ind = function(){ | ||
if (!flags.format) return ''; | ||
else return (new Array(il+1)).join(flags.format); | ||
if (!flags.tab) return ''; | ||
else return (new Array(il+1)).join(flags.tab); | ||
}; | ||
var nli = function(){ | ||
if (!flags.format) return ''; | ||
if (!flags.tab) return ''; | ||
else return '\n'+ind(flags, il); | ||
}; | ||
var sp = function(){ | ||
if (flags.squeeze) return ''; | ||
if (flags.compress) return ''; | ||
else return ' '; | ||
@@ -28,0 +26,0 @@ }; |
@@ -10,3 +10,3 @@ { | ||
"author": "aynik", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"repository": { | ||
@@ -21,3 +21,3 @@ "type": "git", | ||
"dependencies": { | ||
"optimist": ">=0.6.1" | ||
"commander": ">=2.3.0" | ||
}, | ||
@@ -24,0 +24,0 @@ "devDependencies": { |
@@ -1,11 +0,5 @@ | ||
# jsjs | ||
## A handy javascript to javascript compiler | ||
./jsjs.js __js_file__ | ||
# Jsjs | ||
## A handy javascript to javascript transpiler | ||
[![Build Status via Travis CI](https://travis-ci.org/aynik/jsjs.svg?branch=master)](https://travis-ci.org/aynik/sx) | ||
[![Build Status via Travis CI](https://travis-ci.org/aynik/jsjs.svg?branch=master)](https://travis-ci.org/aynik/jsjs) | ||
@@ -12,0 +6,0 @@ Pull requests are very welcome! |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
763459
9
16338
50
1
1
+ Addedcommander@>=2.3.0
+ Addedcommander@12.1.0(transitive)
- Removedoptimist@>=0.6.1
- Removedminimist@0.0.10(transitive)
- Removedoptimist@0.6.1(transitive)
- Removedwordwrap@0.0.3(transitive)