How to use the node-ical.parseFile function in node-ical

To help you get started, we’ve selected a few node-ical examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github naimo84 / node-red-contrib-ical-events / src / helper.ts View on Github external
header = {
                    headers: {
                        'Authorization': auth
                    }
                }
            }

            ical.fromURL(node.config.url, header, (err, data) => {
                if (err) {
                    callback && callback(err, null);
                    return;
                }
                callback && callback(null, data);
            });
        } else {
            ical.parseFile(node.config.url, (err, data) => {
                if (err) {
                    callback && callback(err, null);
                    return;
                }
                callback && callback(null, data);
            });
        }
    }

}
github naimo84 / node-red-contrib-ical-events / dist / helper.js View on Github external
header = {
                    headers: {
                        'Authorization': auth
                    }
                };
            }
            ical.fromURL(node.config.url, header, function (err, data) {
                if (err) {
                    callback && callback(err, null);
                    return;
                }
                callback && callback(null, data);
            });
        }
        else {
            ical.parseFile(node.config.url, function (err, data) {
                if (err) {
                    callback && callback(err, null);
                    return;
                }
                callback && callback(null, data);
            });
        }
    }
}
exports.getICal = getICal;

node-ical

NodeJS class for parsing iCalendar/ICS files

Apache-2.0
Latest version published 2 months ago

Package Health Score

84 / 100
Full package analysis