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

@kamkam1_0/datebook

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kamkam1_0/datebook

DateBook is simple to use module that allows you to create .ics files.

  • 1.4.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
12
decreased by-36.84%
Maintainers
1
Weekly downloads
 
Created
Source

DateBook

DateBook is simple to use module that allows you to create .ics files.

Installation

npm install @kamkam1_0/datebook

Functionalities

  • Create a .ics file
  • Get the buffer of that .ics file
  • Get the text of that .ics file
  • Download that ics file

How to use

Accepted date formats

  • 1990/01/01
  • 01/01/1990
  • 1990-01-01
  • 01-01-1990
  • 1990/01/01T00:00:00
  • 01/01/1990T00:00:00
  • 1990-01-01T00:00:00
  • 01-01-1990T00:00:00

Required infos

const DateBook = require("@kamkam1_0/datebook")
let Calendar = new DateBook.Calendar()
.AddStart("01/01/1990T09:00:00")
.AddEnd("01/01/1990T19:00:00")
.AddTitle("Work")

Optional Infos

const DateBook = require("@kamkam1_0/datebook")
let Calendar = new DateBook.Calendar()
.AddDescription("This is a description")
.AddGeo("48.861919983985295, 2.3379453552360845")
.AddLocation("91, Rue de Rivoli, 75001 Paris")

Recurrence

Frequencies

  • hourly
  • daily
  • weekly
  • monthly
  • yearly

You can add two types of recurrence.

You can add one until a specific date.

const DateBook = require("@kamkam1_0/datebook")
let Calendar = new DateBook.Calendar()
.AddRecurrence("daily", "02/01/1990")

You can also add a recurrence for a precise number of time.

const DateBook = require("@kamkam1_0/datebook")
let Calendar = new DateBook.Calendar()
.AddRecurrence("daily", "2")

Download

There are different ways you can get the infos of your calendar.

Download name

You have the possiblity to add a name to the file that will be created. By default, the name of the file is the date of the event.

const DateBook = require("@kamkam1_0/datebook")
let Calendar = new DateBook.Calendar()
Calendar.AddDownloadName("#name")//->01/01/1990-name.ics
Calendar.AddDownloadName("name")//->name.ics

Get the infos without downloading

const DateBook = require("@kamkam1_0/datebook")
let Calendar = new DateBook.Calendar()

Calendar.ToText()
Calendar.ToBuffer()
Calendar.getDownloadInfos()//Gives you the infos based on the simulation of the download-> {name: "01/01/1190", extension: "ics", buffer}

Downloading

There are three ways to download a file.

You can simply download the file in the directory of the process.

const DateBook = require("@kamkam1_0/datebook")
let Calendar = new DateBook.Calendar()
Calendar.Download()

You can also indicate, based on the process directory, the path to follow.

const DateBook = require("@kamkam1_0/datebook")
let Calendar = new DateBook.Calendar()
Calendar.Download("/ics")

Finally, you can indicate the entire path to follow.

const DateBook = require("@kamkam1_0/datebook")
let Calendar = new DateBook.Calendar()
Calendar.Download("/Users/johndoe/Desktop/Dev/Bot")

Keywords

FAQs

Package last updated on 12 Jan 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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