Projektstart
This commit is contained in:
29
backend/node_modules/@fastify/send/lib/createHtmlDocument.js
generated
vendored
Normal file
29
backend/node_modules/@fastify/send/lib/createHtmlDocument.js
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
/*!
|
||||
* send
|
||||
* Copyright(c) 2012 TJ Holowaychuk
|
||||
* Copyright(c) 2014-2022 Douglas Christopher Wilson
|
||||
* MIT Licensed
|
||||
*/
|
||||
'use strict'
|
||||
/**
|
||||
* Create a minimal HTML document.
|
||||
*
|
||||
* @param {string} title
|
||||
* @param {string} body
|
||||
* @private
|
||||
*/
|
||||
function createHtmlDocument (title, body) {
|
||||
const html = '<!DOCTYPE html>\n' +
|
||||
'<html lang="en">\n' +
|
||||
'<head>\n' +
|
||||
'<meta charset="utf-8">\n' +
|
||||
'<title>' + title + '</title>\n' +
|
||||
'</head>\n' +
|
||||
'<body>\n' +
|
||||
'<pre>' + body + '</pre>\n' +
|
||||
'</body>\n' +
|
||||
'</html>\n'
|
||||
|
||||
return [html, Buffer.byteLength(html)]
|
||||
}
|
||||
exports.createHtmlDocument = createHtmlDocument
|
||||
Reference in New Issue
Block a user