UNPKG

@barinbritva/add-to-calendar

Version:

[![Dependencies counter](https://img.shields.io/badge/dependencies-none-green?style=flat-square)](https://github.com/barinbritva/add-to-calendar/blob/master/package.json) [![License](https://img.shields.io/npm/l/micromatch?style=flat-square)](https://gith

18 lines (17 loc) 464 B
export class MultiGenerator { constructor(generators) { this.generators = generators; } createLinks(event, asArray) { const links = {}; Object.keys(this.generators).forEach((key) => { links[key] = this.generators[key].createLink(event); }); if (!asArray) { return links; } return Object.keys(links).map((key) => { return [key, links[key]]; }); } }