Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jsq

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsq - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

22

index.js

@@ -21,3 +21,3 @@ #!/usr/bin/env node

}
var replaceCount = 0, skipCount = 0, fileCount = 0;
var replaceCount = 0, skipParseErrorCount = 0, skipSingleQuoteErrorCount = 0, unknownErrorCount = 0, fileCount = 0;
args.forEach(function (dirOrFile) {

@@ -33,4 +33,14 @@ var finder = findit(dirOrFile);

} catch (ex) {
skipCount++;
verbose && console.log('Skipping file because of error parsing file or bug in jsq: %s', file, ex);
if(ex.code==='singlequote'){
skipSingleQuoteErrorCount++;
verbose && console.log('Skipping file because jsq did not handle code correctly:\n%s', file, ex.inner);
return;
}
if(ex.code==='parse'){
skipParseErrorCount++;
verbose && console.log('Skipping file because it can not be parsed as valid JavaScript:\n%s', file, ex.inner);
return;
}
unknownErrorCount++;
verbose && console.log('Skipping file because of unknown internal error:\n%s', file, ex.inner);
return;

@@ -50,4 +60,8 @@ }

console.log('%d .js files were scanned by jsq', fileCount);
skipCount && console.log('%s of those were skipped because of error parsing file or bug in jsq', skipCount,
skipParseErrorCount && console.log('%s of those were skipped because of error parsing JavaScript in file', skipParseErrorCount,
verbose ? '' : '(use -v param to see details)');
skipSingleQuoteErrorCount && console.log('%s of those were skipped because jsq could not handle them correctly (we accept pull requests)', skipSingleQuoteErrorCount,
verbose ? '' : '(use -v param to see details)');
unknownErrorCount && console.log('%s of those were skipped because unknown internal errors in jsq', unknownErrorCount,
verbose ? '' : '(use -v param to see details)');
console.log('%s of those had double quoted JavaScript strings replaced', replaceCount || 'None');

@@ -54,0 +68,0 @@ });

2

package.json
{
"name": "jsq",
"version": "0.0.5",
"version": "0.0.6",
"description": "Command line tool for repacing all double quoted strings with single quoted strings in a file or directory. Usage: jsq fileOrDirectory [fileOrDirectory [..]]",

@@ -5,0 +5,0 @@ "main": "index.js",

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