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.3.1 to 2.0.0

CHANGELOG.md

31

dist/index.js
"use strict";
var __rest = (this && this.__rest) || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
};
var __importDefault = (this && this.__importDefault) || function (mod) {

@@ -28,3 +17,3 @@ return (mod && mod.__esModule) ? mod : { "default": mod };

exports.eventify = (event) => {
const { start, end, duration } = event, rest = __rest(event, ["start", "end", "duration"]);
const { start, end, duration, ...rest } = event;
const startUtc = dayjs_1.default(start).utc();

@@ -44,7 +33,7 @@ const endUtc = end

})();
if (!rest.url && typeof document == "object") {
rest.url = document.URL;
}
return Object.assign(Object.assign({}, rest), { startUtc,
endUtc });
return {
...rest,
startUtc,
endUtc,
};
};

@@ -111,9 +100,9 @@ exports.google = (calendarEvent) => {

const formattedDescription = (event.description || "")
.replace(/,/gm, "\,")
.replace(/;/gm, "\;")
.replace(/,/gm, ",")
.replace(/;/gm, ";")
.replace(/\n/gm, "\\n")
.replace(/(\\n)[\s\t]+/gm, "\\n");
const formattedLocation = (event.location || "")
.replace(/,/gm, "\,")
.replace(/;/gm, "\;")
.replace(/,/gm, ",")
.replace(/;/gm, ";")
.replace(/\n/gm, "\\n")

@@ -120,0 +109,0 @@ .replace(/(\\n)[\s\t]+/gm, "\\n");

@@ -18,3 +18,3 @@ import dayjs from "dayjs";

}
interface Google {
interface Google extends Record<string, string | boolean | number | undefined> {
action: string;

@@ -31,3 +31,3 @@ text: string;

}
interface Outlook {
interface Outlook extends Record<string, string | boolean | number | undefined> {
path: string;

@@ -42,3 +42,3 @@ rru: string;

}
interface Yahoo {
interface Yahoo extends Record<string, string | boolean | number | undefined> {
v: number;

@@ -45,0 +45,0 @@ title: string;

{
"name": "calendar-link",
"version": "1.3.1",
"version": "2.0.0",
"description": "πŸ“… Calendar link generator for popular services, like Google, Outlook, and Yahoo.",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
"dist"
],
"types": "dist/index.d.ts",
"repository": "git@github.com:AnandChowdhary/calendar-link",
"author": "Anand Chowdhary <anandchowdhary@gmail.com>",
"license": "MIT",
"scripts": {
"build": "tsc",
"build-test": "yarn build && yarn test-without-coverage",
"start": "concurrently 'yarn prettier-watch' 'yarn watch'",
"watch": "onchange '*.{ts,json}' -- yarn test-without-coverage",
"prettier-watch": "onchange '**/*.{ts,json}' -- prettier --write {{changed}}",
"test": "jest --coverage --coverageReporters=text-lcov | coveralls",
"test-without-reporting": "jest --coverage",
"test-without-coverage": "jest"
"test": "jest",
"test-watch": "jest --watch",
"coverage": "jest --coverage",
"update-template": "npx update-template https://github.com/AnandChowdhary/calendar-link",
"semantic-release": "semantic-release"
},
"repository": {
"type": "git",
"url": "git+https://github.com/AnandChowdhary/calendar-link.git"
},
"keywords": [
"nodejs",
"typescript",
"calendar",
"calendar-link",
"google-calendar",
"outlook",
"yahoo"
],
"author": "Anand Chowdhary <mail@anandchowdhary.com>",
"license": "MIT",
"bugs": {
"url": "https://github.com/AnandChowdhary/calendar-link/issues"
},
"homepage": "https://anandchowdhary.github.io/calendar-link/",
"devDependencies": {
"@types/jest": "^26.0.12",
"concurrently": "^5.3.0",
"coveralls": "^3.1.0",
"jest": "^26.4.2",
"onchange": "^7.0.2",
"prettier": "^2.1.1",
"ts-jest": "^26.3.0",
"typescript": "^4.0.2"
"@koj/config": "1.2.5",
"@semantic-release/changelog": "^5.0.1",
"@semantic-release/git": "^9.0.0",
"@semantic-release/github": "^7.1.1",
"@semantic-release/npm": "^7.0.6",
"@types/jest": "^26.0.14",
"jest": "^26.6.0",
"semantic-release": "^17.2.1",
"semantic-release-gitmoji": "^1.3.4",
"ts-jest": "^26.4.1",
"typescript": "^4.0.3",
"update-template": "^1.1.2"
},
"jest": {
"roots": [
"<rootDir>"
],
"transform": {
"^.+\\.tsx?$": "ts-jest"
},
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"jsx",
"json",
"node"
]
},
"dependencies": {
"dayjs": "^1.8.34",
"query-string": "^6.13.1"
"dayjs": "^1.9.3",
"query-string": "^6.13.6"
}
}

@@ -1,10 +0,11 @@

# Calendar Link
# πŸ“… Calendar Link
[![Travis](https://img.shields.io/travis/AnandChowdhary/calendar-link.svg)](https://travis-ci.org/AnandChowdhary/calendar-link)
[![Coverage Status](https://coveralls.io/repos/github/AnandChowdhary/calendar-link/badge.svg?branch=master)](https://coveralls.io/github/AnandChowdhary/calendar-link?branch=master)
[![GitHub](https://img.shields.io/github/license/anandchowdhary/calendar-link.svg)](https://github.com/AnandChowdhary/calendar-link/blob/master/LICENSE)
![Vulnerabilities](https://img.shields.io/snyk/vulnerabilities/github/AnandChowdhary/calendar-link.svg)
![NPM type definitions](https://img.shields.io/npm/types/calendar-link.svg)
[![NPM](https://img.shields.io/npm/v/calendar-link.svg)](https://www.npmjs.com/package/calendar-link)
[![All contributors](https://img.shields.io/badge/all_contributors-2-orange.svg)](#contributors)
<!-- prettier-ignore-start -->
| | Status |
| - | - |
| Build | [![Node CI](https://github.com/AnandChowdhary/calendar-link/workflows/Node%20CI/badge.svg)](https://github.com/AnandChowdhary/calendar-link/actions?query=workflow%3A%22Node+CI%22) [![Dependencies](https://img.shields.io/librariesio/github/AnandChowdhary/calendar-link)](https://libraries.io/github/AnandChowdhary/calendar-link) [![GitHub release (latest by date)](https://img.shields.io/github/v/release/AnandChowdhary/calendar-link)](https://github.com/AnandChowdhary/calendar-link/releases) [![Snyk Vulnerabilities for GitHub Repo](https://img.shields.io/snyk/vulnerabilities/github/AnandChowdhary/calendar-link)](https://snyk.io/test/github/AnandChowdhary/calendar-link) |
| Health | [![License](https://img.shields.io/github/license/anandchowdhary/calendar-link.svg)](https://github.com/AnandChowdhary/calendar-link/blob/master/LICENSE) [![Coverage](https://img.shields.io/coveralls/github/AnandChowdhary/calendar-link)](https://coveralls.io/github/AnandChowdhary/calendar-link) [![Pull Request Labeler](https://github.com/AnandChowdhary/calendar-link/workflows/Pull%20Request%20Labeler/badge.svg)](https://github.com/AnandChowdhary/calendar-link/actions?query=workflow%3A%22Pull+Request+Labeler%22) |
| PRs | [![Feature Branch Pull Request](https://github.com/AnandChowdhary/calendar-link/workflows/Feature%20Branch%20Pull%20Request/badge.svg)](https://github.com/AnandChowdhary/calendar-link/actions?query=workflow%3A%22Feature+Branch+Pull+Request%22) [![Hotfix Branch Pull Request](https://github.com/AnandChowdhary/calendar-link/workflows/Hotfix%20Branch%20Pull%20Request/badge.svg)](https://github.com/AnandChowdhary/calendar-link/actions?query=workflow%3A%22Hotfix+Branch+Pull+Request%22) [![Merge PRs](https://github.com/AnandChowdhary/calendar-link/workflows/Merge%20PRs/badge.svg)](https://github.com/AnandChowdhary/calendar-link/actions?query=workflow%3A%22Merge+PRs%22) |
| Community | ![NPM type definitions](https://img.shields.io/npm/types/calendar-link.svg) [![NPM](https://img.shields.io/npm/v/calendar-link.svg)](https://www.npmjs.com/package/calendar-link) [![All contributors](https://img.shields.io/badge/all_contributors-2-orange.svg)](#contributors) |
<!-- prettier-ignore-end -->

@@ -19,4 +20,8 @@ JavaScript library to generate an event link for Google Calendar, Yahoo!

```js
import { google, outlook, office365, yahoo, ics } from "calendar-link";
// Usage with Node.js
const { google, outlook, office365, yahoo, ics } = require("calendar-link");
// Usage with TypeScript or ES6
import { google, outlook, office365, yahoo, ics } from "calendar-link";
// Set event as an object

@@ -27,3 +32,3 @@ const event = {

start: "2019-12-29 18:00:00 +0100",
duration: [3, "hour"]
duration: [3, "hour"],
};

@@ -85,2 +90,3 @@

<td align="center"><a href="https://rhellenes.me"><img src="https://avatars0.githubusercontent.com/u/16990441?v=4" width="100px;" alt=""/><br /><sub><b>RenΓ© Hellenes</b></sub></a><br /><a href="https://github.com/AnandChowdhary/calendar-link/commits?author=RHellenes" title="Code">πŸ’»</a></td>
<td align="center"><a href="https://github.com/fidelman"><img src="https://avatars0.githubusercontent.com/u/15198653?v=4" width="100px;" alt=""/><br /><sub><b>Andrei Fidelman</b></sub></a><br /><a href="https://github.com/AnandChowdhary/calendar-link/commits?author=fidelman" title="Code">πŸ’»</a></td>
</tr>

@@ -91,2 +97,3 @@ </table>

<!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END -->

@@ -93,0 +100,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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