npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

generate-google-calendar-link

v1.0.0

Published

Genelate a link to add a new event to the Google Calendar.

Readme

generate-google-calendar-link

Genelate a link to add a new event to the Google Calendar.

Google Calendarに予定を追加するlinkを生成します。

This function will return a dom element.

DOM 要素を返します。

Usage

実行例

var a = generateLink({
    start: new Date(2014, 10, 15, 10),
    end: new Date(2014, 10, 15, 18),
    title: 'New event',
    location: 'Some where',
    details: 'http://event.description.example.com/11234'
})

Parameters

See generate-google-calendar-url

Setup

For Node.js

Node.js 26 以上が必要です。このパッケージは ES Modules の default export を公開します。 従来の require() は import に変更してください。

インストール

npm install generate-google-calendar-link

実行例(.mjs ファイル、または package.json に "type": "module" を指定)

import generateLink from 'generate-google-calendar-link'
var a = generateLink({
    start: new Date(2014, 10, 15, 10),
    end: new Date(2014, 10, 15, 18),
    title: 'New event',
    location: 'Some where',
    details: 'http://event.description.example.com/11234'
})

console.log(a.href)

For browsers

ES Modules と CommonJS の依存ライブラリを処理できるバンドラーを使用してください。 従来の Browserify のみの手順は対応しません。 日付の処理にはブラウザの Temporal API が必要です。ポリフィルは同梱しません。

バンドラーのエントリーファイル(example.js)の例:

import generateLink from 'generate-google-calendar-link'

document.getElementById('result').appendChild(generateLink({
    title: 'New event',
    date: '2026/09/22'
}))

バンドラーが出力した bundle.js を HTML から読み込みます。

<span id="result"></span>
<script type="module" src="bundle.js"></script>

Contributing

contributeするには

  1. Fork it.
  2. Create a branch (git checkout -b my_function)
  3. Commit your changes (git commit -am "Added My Function")
  4. Push to the branch (git push origin my_function)
  5. Open a Pull Request
  6. Enjoy a refreshing coffe and wait

Test

Standalone

mocha is used to test.

mochaを使います。

npm install
npm test

Deploy

npm

Publishing uses npm trusted publishing. In the npm package settings, configure GitHub Actions as a trusted publisher:

  • Organization or user: ledsun
  • Repository: generate-google-calendar-link
  • Workflow filename: publish.yml
  • Environment name: leave blank
  • Allow direct publishing with npm publish.

Update the version in package.json and package-lock.json (for example, with npm version patch), then push the commit and version tag. Pushing a tag matching v* (for example, v0.0.6) runs .github/workflows/publish.yml. The workflow installs dependencies, runs tests, and publishes to npm.