New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

calendar-link

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

calendar-link - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

dist/interfaces.d.ts

7

dist/index.d.ts

@@ -1,2 +0,5 @@

declare const a = "a";
export { a };
import { CalendarEvent } from "./interfaces";
export declare const eventify: (event: CalendarEvent) => CalendarEvent;
export declare const google: (event: CalendarEvent) => string;
export declare const outlook: (event: CalendarEvent) => string;
export declare const yahoo: (event: CalendarEvent) => string;
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const a = "a";
exports.a = a;
const dayjs_1 = __importDefault(require("dayjs"));
const querystring_1 = require("querystring");
exports.eventify = (event) => {
event.start = dayjs_1.default(event.start).toDate();
if (event.duration && event.duration.length && !event.end) {
const duration = Number(event.duration[0]);
const unit = event.duration[1];
event.end = dayjs_1.default(event.start)
.add(duration, unit)
.toDate();
}
return event;
};
exports.google = (event) => {
event = exports.eventify(event);
const startDate = dayjs_1.default(event.start)
.toISOString()
.replace(/-/g, "")
.replace(/:/g, "")
.replace(/\./g, "");
const endDate = dayjs_1.default(event.end)
.toISOString()
.replace(/-/g, "")
.replace(/:/g, "")
.replace(/\./g, "");
const details = {
action: "TEMPLATE",
text: event.title,
details: event.description,
location: event.location,
trp: event.busy,
dates: startDate.substring(0, startDate.length - 4) +
"Z/" +
endDate.substring(0, endDate.length - 4) +
"Z"
};
if (event.guests && event.guests.length) {
details.add = event.guests.join();
}
return `https://calendar.google.com/calendar/render?${querystring_1.stringify(details)}`;
};
exports.outlook = (event) => {
event = exports.eventify(event);
const details = {
path: "/calendar/action/compose",
rru: "addevent",
startdt: dayjs_1.default(event.start).format("YYYYMMDD[T]HHmmss"),
enddt: dayjs_1.default(event.end).format("YYYYMMDD[T]HHmmss"),
subject: event.title,
body: event.description,
location: event.location
};
return `https://outlook.live.com/owa/?${querystring_1.stringify(details)}`;
};
exports.yahoo = (event) => {
event = exports.eventify(event);
const details = {
v: 60,
title: event.title,
st: dayjs_1.default(event.start).format("YYYYMMDD[T]HHmmss"),
et: dayjs_1.default(event.end).format("YYYYMMDD[T]HHmmss"),
desc: event.description,
in_loc: event.location
};
return `https://calendar.yahoo.com/?${querystring_1.stringify(details)}`;
};
//# sourceMappingURL=index.js.map
{
"name": "calendar-link",
"version": "1.0.0",
"version": "1.0.1",
"main": "dist/index.js",

@@ -5,0 +5,0 @@ "files": [

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