mirror of
https://github.com/SukkaW/Surge.git
synced 2026-01-29 01:51:52 +08:00
Update CHN IP CIDR generation
This commit is contained in:
17
Build/lib/with-banner.js
Normal file
17
Build/lib/with-banner.js
Normal file
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* @param {string} title
|
||||
* @param {string[]} description
|
||||
* @param {Date} date
|
||||
* @param {string[]} content
|
||||
* @returns {string}
|
||||
*/
|
||||
const withBanner = (title, description, date, content) => {
|
||||
return `########################################
|
||||
# ${title}
|
||||
${description.map(line => `# ${line}`).join('\n')}
|
||||
# Last Updated: ${date.toISOString()}
|
||||
# Size: ${content.length}
|
||||
########################################\n` + content.join('\n') + '\n################# END ###################\n';
|
||||
};
|
||||
|
||||
module.exports.withBanner = withBanner;
|
||||
Reference in New Issue
Block a user