Socket
Socket
Sign inDemoInstall

yaspeller

Package Overview
Dependencies
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yaspeller - npm Package Compare versions

Comparing version 1.0.0-pre4 to 1.0.0

19

lib/report/html.js

@@ -111,3 +111,3 @@ /*jshint maxlen:1000 */

total++;
if(!el[0] || (el[1].data && el[1].data.length)) {
if(el[0] || (!el[0] && el[1].data && el[1].data.length)) {
err++;

@@ -119,16 +119,13 @@ } else {

var dir = pth.resolve('./yaspeller'),
template = fs.readFileSync('lib/report/template.html').toString(),
var template = fs.readFileSync(pth.join(__dirname, 'template.html')).toString(),
filename = 'yaspeller_report.html',
html = '<div class="total">Processed resources: ' + total +
' (<span class="sym-err">&chi;</span>' + '&ndash; ' + err + '</span>, <span class="sym-ok">&checkmark;</span>&ndash; ' + ok + ')<br/>' +
'Checking finished: ' + ((+new Date() - startTime) / 1000) + ' sec.' + '</div>' +
' (<span class="sym-err">&chi;</span>&ndash; ' + err +
'</span>, <span class="sym-ok">&checkmark;</span>&ndash; ' + ok + ')<br/>' +
'Checking finished: ' + ((+new Date() - startTime) / 1000) + ' sec.</div>' +
buffer.join('');
try {
if(!fs.existsSync(dir)) {
fs.mkdirSync(dir);
}
fs.writeFileSync(pth.join(dir, 'report.html'), template.replace(/\{\{content\}\}/, html));
console.log(chalk.cyan('HTML report: ./yaspeller/report.html'));
fs.writeFileSync(filename, template.replace(/\{\{content\}\}/, html));
console.log(chalk.cyan('HTML report: ./' + filename));
} catch(e) {

@@ -135,0 +132,0 @@ console.error(e);

var fs = require('fs'),
pth = require('path'),
chalk = require('chalk');

@@ -7,11 +6,6 @@

onend: function(data) {
var dir = pth.resolve('./yaspeller');
var filename = 'yaspeller_report.json';
try {
if(!fs.existsSync(dir)) {
fs.mkdirSync(dir);
}
fs.writeFileSync(pth.join(dir, 'report.json'), JSON.stringify(data, null, ' '));
console.log(chalk.cyan('JSON report: ./yaspeller/report.json'));
fs.writeFileSync(filename, JSON.stringify(data, null, ' '));
console.log(chalk.cyan('JSON report: ./' + filename));
} catch(e) {

@@ -18,0 +12,0 @@ console.error(e);

@@ -13,3 +13,3 @@ {

"description": "Search tool typos in the text, files and websites",
"version": "1.0.0pre4",
"version": "1.0.0",
"license": "MIT",

@@ -16,0 +16,0 @@ "homepage": "https://github.com/hcodes/yaspeller",

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