MCPcopy Create free account
hub / github.com/loopbackio/loopback-next / getCustomTemplate

Function getCustomTemplate

packages/cli/generators/copyright/header.js:31–44  ·  view source on GitHub ↗
(customLicenseLines = [])

Source from the content-addressed store, hash-verified

29const LICENSED = _.template(COPYRIGHT.concat(LICENSE).join('\n'));
30
31function getCustomTemplate(customLicenseLines = []) {
32 if (typeof customLicenseLines === 'string') {
33 customLicenseLines = [customLicenseLines];
34 }
35 let CUSTOM = _.template(COPYRIGHT.join('\n'));
36 if (customLicenseLines.length) {
37 let copyrightLines = COPYRIGHT;
38 if (customLicenseLines.some(line => line.includes('Copyright'))) {
39 copyrightLines = [];
40 }
41 CUSTOM = _.template(copyrightLines.concat(customLicenseLines).join('\n'));
42 }
43 return CUSTOM;
44}
45
46// Patterns for matching previously generated copyright headers
47const BLANK = /^\s*$/;

Callers 1

expandLicenseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected