Comparing version 1.1.3 to 1.1.4
// Generated by CoffeeScript 1.8.0 | ||
var FieldConflictError, FieldDependencyError, ICalParser, InvalidValueError, MissingFieldError, RRule, VALID_TZ_LIST, VAlarm, VCalendar, VComponent, VDaylight, VEvent, VFreeBusy, VJournal, VStandard, VTimezone, VTodo, extend, fs, helpers, iCalBuffer, lazy, moment, uuid, _ref, | ||
var FieldConflictError, FieldDependencyError, ICalParser, InvalidValueError, MissingFieldError, RRule, VALID_TZ_LIST, VAlarm, VCalendar, VComponent, VDaylight, VEvent, VFreeBusy, VJournal, VStandard, VTimezone, VTodo, byline, extend, fs, helpers, iCalBuffer, moment, stream, uuid, _ref, | ||
__hasProp = {}.hasOwnProperty, | ||
@@ -12,4 +12,6 @@ __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, | ||
lazy = require('lazy'); | ||
byline = require('byline'); | ||
stream = require('stream'); | ||
extend = require('extend'); | ||
@@ -242,7 +244,10 @@ | ||
this.addRawField('VERSION', '2.0'); | ||
return this.addRawField('PRODID', prodid); | ||
this.addRawField('PRODID', prodid); | ||
if (this.model.name) { | ||
return this.addTextField('X-WR-CALNAME', this.model.name); | ||
} | ||
}; | ||
VCalendar.prototype.extract = function() { | ||
var extractPRODID, organization, results, title, value, _; | ||
var extractPRODID, name, organization, results, title, value, _; | ||
VCalendar.__super__.extract.call(this); | ||
@@ -258,5 +263,7 @@ value = this.getRawField('PRODID').value; | ||
} | ||
name = this.getTextFieldValue('X-WR-CALNAME'); | ||
return this.model = { | ||
organization: organization, | ||
title: title | ||
title: title, | ||
name: name | ||
}; | ||
@@ -889,39 +896,8 @@ }; | ||
ICalParser.prototype.parseString = function(string, callback) { | ||
var FakeStream, fakeStream; | ||
FakeStream = (function(_super) { | ||
__extends(FakeStream, _super); | ||
function FakeStream() { | ||
return FakeStream.__super__.constructor.apply(this, arguments); | ||
} | ||
FakeStream.prototype.readable = true; | ||
FakeStream.prototype.writable = false; | ||
FakeStream.prototype.setEncoding = function() { | ||
throw new Error('not implemented'); | ||
}; | ||
FakeStream.prototype.pipe = function() { | ||
throw new Error('not implemented'); | ||
}; | ||
FakeStream.prototype.destroy = function() {}; | ||
FakeStream.prototype.resume = function() {}; | ||
FakeStream.prototype.pause = function() {}; | ||
FakeStream.prototype.send = function(string) { | ||
this.emit('data', string); | ||
return this.emit('end'); | ||
}; | ||
return FakeStream; | ||
})(require('events').EventEmitter); | ||
fakeStream = new FakeStream; | ||
var fakeStream; | ||
fakeStream = new stream.Readable(); | ||
fakeStream._read = function() {}; | ||
this.parse(fakeStream, callback); | ||
return fakeStream.send(string); | ||
fakeStream.push(string); | ||
return fakeStream.push(null); | ||
}; | ||
@@ -931,2 +907,3 @@ | ||
var completeLine, component, createComponent, lineNumber, lineParser, noerror, parent, result, sendError; | ||
stream = byline(stream); | ||
result = {}; | ||
@@ -999,10 +976,11 @@ noerror = true; | ||
}; | ||
return lazy(stream).lines.forEach(function(line) { | ||
return stream.on('data', function(line) { | ||
stream.pause(); | ||
lineNumber++; | ||
line = line.toString('utf-8').replace("\r", ''); | ||
if (line === '' || line === '0') { | ||
return; | ||
return stream.resume(); | ||
} | ||
if (line[0] === ' ') { | ||
return completeLine += line.substring(1); | ||
completeLine += line.substring(1); | ||
} else { | ||
@@ -1012,4 +990,5 @@ if (completeLine) { | ||
} | ||
return completeLine = line; | ||
completeLine = line; | ||
} | ||
return stream.resume(); | ||
}); | ||
@@ -1016,0 +995,0 @@ }; |
{ | ||
"name": "cozy-ical", | ||
"version": "1.1.3", | ||
"version": "1.1.4", | ||
"description": "Cozy-Ical provides ICal Parser, generators and helpers", | ||
@@ -39,3 +39,3 @@ "main": "lib/index", | ||
"rrule": "2.1.0", | ||
"lazy": "1.0.11", | ||
"byline": "4.1.1", | ||
"printit": "0.1.3", | ||
@@ -42,0 +42,0 @@ "extend": "2.0.0", |
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
81308
1838
+ Addedbyline@4.1.1
+ Addedbyline@4.1.1(transitive)
- Removedlazy@1.0.11
- Removedlazy@1.0.11(transitive)