1 | import moment from 'moment';
|
2 |
|
3 | const plugin = async (schema, documents, config) => {
|
4 | let format;
|
5 | let message = 'Generated on ';
|
6 | if (config && typeof config === 'string') {
|
7 | format = config;
|
8 | }
|
9 | else if (config && typeof config === 'object') {
|
10 | if (config.format) {
|
11 | format = config.format;
|
12 | }
|
13 | if (config.message) {
|
14 | message = config.message;
|
15 | }
|
16 | }
|
17 | return '// ' + message + moment().format(format) + '\n';
|
18 | };
|
19 |
|
20 | export { plugin };
|
21 | //# sourceMappingURL=index.esm.js.map
|