UNPKG

822 BJavaScriptView Raw
1import moment from 'moment';
2import pkg from '../package.json';
3
4const header = `
5${ pkg.homepage }
6
7${ pkg.description }
8
9@version ${ pkg.version }
10@date ${ moment().utc().format() }
11
12@copyright (c) 2011-2017 Almende B.V, http://almende.com
13@copyright (c) 2018-2019 visjs contributors, https://github.com/visjs
14
15@license
16vis.js is dual licensed under both
17
18 1. The Apache 2.0 License
19 http://www.apache.org/licenses/LICENSE-2.0
20
21 and
22
23 2. The MIT License
24 http://opensource.org/licenses/MIT
25
26vis.js may be distributed under either license.`;
27
28/**
29 * Generate a dynamic header banner.
30 *
31 * @param {String} component
32 * @returns {String} banner
33 */
34function genHeader(component) {
35 return [
36 pkg.name,
37 component ? ' - ' + component : '',
38 header
39 ].join('');
40}
41
42export default genHeader;
\No newline at end of file