New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

krasota

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

krasota - npm Package Compare versions

Comparing version 0.1.7 to 0.1.8

lib/beautifiers/comma-list-whitespaces-expand.js

68

lib/coa.js

@@ -1,2 +0,16 @@

exports.COA = require('coa').Cmd()
function beautifiersOpt() {
this.opt()
.name('beautifiers').title('Local or global path to beautifier module, can be used many times')
.short('b').long('beautifier')
.arr()
.req()
.val(function(b) {
return typeof b == 'string'
? require(b.match(/^\./) ? require('path').resolve(b) : b).KrasotaJS
: b
})
.end()
}
var COA = exports.COA = require('coa').Cmd()
.name('krasota').helpful()

@@ -22,11 +36,3 @@ .opt()

.end()
.opt()
.name('beautifiers').title('Local or global path to beautifier module, can be used many times')
.short('b').long('beautifier')
.arr()
.req()
.val(function(b) {
return require(b.match(/^\./) ? require('path').resolve(b) : b).KrasotaJS
})
.end()
.apply(beautifiersOpt)
.act(function(options) {

@@ -43,8 +49,12 @@ var K = require('./krasota'),

output.write(K.matchTop(
K.KrasotaJSSerializer,
K.KrasotaJSBeautify(
options.beautifiers,
K.matchTop(K.KrasotaJSParser, input.join(''), 'tree')),
'serialize'));
try {
output.write(K.matchTop(
K.KrasotaJSSerializer,
K.KrasotaJSBeautify(
options.beautifiers,
K.matchTop(K.KrasotaJSParser, input.join(''), 'tree')),
'serialize'));
} catch(e) {
console.log(e);
}

@@ -61,1 +71,27 @@ output === process.stdout ?

});
COA.cmd()
.name('recursive').helpful()
.apply(beautifiersOpt)
.opt()
.name('backup').title('Saving backups with the specified extension. If a zero-length extension is given, no backup will be saved.')
.long('backup')
.req()
.end()
.opt()
.name('ignore').title('Ignore mask (.gitignore-style).')
.long('ignore').short('i')
.arr()
.end()
.opt()
.name('ignoreFile').title('File name for looking ignore masks (in addition with .krasotaignore).')
.long('ignore-file')
.arr()
.end()
.arg()
.name('directory')
//.arr()
.def(process.cwd())
.end()
.act(require('./recursive')(COA))
.end();

@@ -626,3 +626,3 @@ var ometajs_ = require("ometajs");

return this._atomic(function() {
return this._match("g") || this._match("i") || this._match("m");
return this._rule("reFlags", false, [], null, this["reFlags"]);
});

@@ -632,2 +632,6 @@ }) && (f = this._getIntermediate(), true) && this._exec([ "re", c, f ]);

KrasotaJSParser.prototype["reFlags"] = function $reFlags() {
return this._match("g") || this._match("i") || this._match("m");
};
KrasotaJSParser.prototype["block"] = function $block() {

@@ -634,0 +638,0 @@ var c;

{
"name": "krasota",
"description": "Syntactic transformations of JavaScript code, with taking care of whitespaces and comments.",
"version": "0.1.7",
"version": "0.1.8",
"homepage": "http://github.com/veged/krasota.js",
"author": "Sergey Berezhnoy <veged@ya.ru> (http://github.com/veged)",
"contributors": [
],
"contributors": [],
"repository": {

@@ -24,3 +23,4 @@ "type": "git",

"ometajs": "3.2.x",
"eyes": "0.1.x"
"eyes": "0.1.x",
"ignore": "2.2.8"
},

@@ -27,0 +27,0 @@ "devDependencies": {

@@ -27,8 +27,7 @@ var UTIL = require('util'),

input != serialize &&
FS.writeFileSync(testPrefix + '.result', serialize)
OkOrNot(
fileContent(testPrefix + '.expect', input) == serialize,
testFile);
input != serialize &&
FS.writeFileSync(testPrefix + '.result', serialize)
});

@@ -69,4 +68,4 @@

str,
'\033[m',
'\033[m'
].join('');
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc