Comparing version 0.2.0 to 0.3.0
@@ -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: |
@@ -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 @@ } |
{ | ||
"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" | ||
} | ||
} |
10
test.js
@@ -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(); | ||
} | ||
}; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11980
155
+ Addedcommander@2.20.3(transitive)
- Removedcommander@2.6.0(transitive)
Updatedcommander@^2.9.0