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

ical2json

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ical2json - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

26

index.js

@@ -48,14 +48,18 @@ (function() {

run = function(options) {
var ext, file, filePath, files, stat, _i, _len;
var ext, file, filePath, files, stat, _i, _len, _results;
files = options.args || [];
_results = [];
for (_i = 0, _len = files.length; _i < _len; _i++) {
file = files[_i];
stat = fs.statSync(file);
ext = path.extname(file);
filePath = path.resolve(cwd, file);
if (!fs.existsSync(filePath)) {
continue;
}
stat = fs.statSync(filePath);
ext = path.extname(filePath);
if (!(stat.isFile() && ext === ".ics")) {
return;
continue;
}
filePath = path.join(cwd, file);
fs.readFile(filePath, function(error, buffer) {
var basename, output, writePath;
_results.push(fs.readFile(filePath, function(error, buffer) {
var basename, dirname, output, writePath;
if (error != null) {

@@ -65,7 +69,9 @@ throw new Error(error);

output = convert(buffer.toString());
basename = path.basename(file, ext);
writePath = path.join(cwd, basename) + ".json";
basename = path.basename(filePath, ext);
dirname = path.dirname(filePath);
writePath = path.join(dirname, basename) + ".json";
return fs.writeFile(writePath, JSON.stringify(output, null, " "));
});
}));
}
return _results;
};

@@ -72,0 +78,0 @@

{
"name": "ical2json",
"version": "0.1.1",
"version": "0.1.2",
"description": "A simple node package to convert ical to JSON",

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

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