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.2.0 to 0.3.0

5

CHANGELOG.md

@@ -0,1 +1,6 @@

##v0.3.0 (2016-06-30)
####Changes:
- Handle multiple child nodes without BEGIN-END
##v0.2.0 (2015/02/11)

@@ -2,0 +7,0 @@ ####Changes:

9

index.js

@@ -56,3 +56,10 @@ // Make sure lines are splited correctly

default:
currentObj[currentKey] = currentValue;
if(currentObj[currentKey]) {
if(!Array.isArray(currentObj[currentKey])) {
currentObj[currentKey] = [currentObj[currentKey]];
}
currentObj[currentKey].push(currentValue);
} else {
currentObj[currentKey] = currentValue;
}
}

@@ -59,0 +66,0 @@ }

21

package.json
{
"name": "ical2json",
"version": "0.2.0",
"version": "0.3.0",
"description": "A simple node package to convert ical to JSON",

@@ -22,19 +22,14 @@ "main": "index.js",

"author": "Adrian Lee",
"licenses": [
{
"type": "MIT",
"url": "https://github.com/adrianlee44/ical2json/blob/master/LICENSE"
}
],
"license": "MIT",
"bin": "bin/ical2json",
"devDependencies": {
"grunt": "~0.4.1",
"grunt-contrib-nodeunit": "~0.3.3",
"grunt-contrib-watch": "~0.6.1",
"matchdep": "~0.3.0",
"grunt-contrib-jshint": "~0.10.0"
"grunt": "^1.0.1",
"grunt-contrib-nodeunit": "^1.0.0",
"grunt-contrib-watch": "^1.0.0",
"matchdep": "^1.0.1",
"grunt-contrib-jshint": "^1.0.0"
},
"dependencies": {
"commander": "~2.6.0"
"commander": "^2.9.0"
}
}

@@ -66,1 +66,11 @@ var ical2json = require("./index"),

};
exports["convert multi-child w/o BEGIN-END"] = {
"make sure multiple child nodes are handled properly": function (test) {
eventString = "BEGIN:VEVENT\nDTSTART;VALUE=DATE:20130101\nDTEND;VALUE=DATE:20130102\nDTSTAMP:20111213T124028Z\nUID:9d6fa48343f70300fe3109efe@calendarlabs.com\nCREATED:20111213T123901Z\nDESCRIPTION:Visit http://calendarlabs.com/holidays/us/new-years-day.php to kn\n ow more about New Year's Day. Like us on Facebook: http://fb.com/calendarlabs to get updates.\nLAST-MODIFIED:20111213T123901Z\nLOCATION:\nSEQUENCE:0\nSTATUS:CONFIRMED\nSUMMARY:New Year's Day\nEXDATE:20111215T093000\nEXDATE:20111216T093000\nTRANSP:TRANSPARENT\nEND:VEVENT";
eventObjs = ical2json.convert(eventString);
test.deepEqual(eventObjs.VEVENT[0].EXDATE, [ "20111215T093000", "20111216T093000" ]);
test.done();
}
};
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