These files should not be added

This commit is contained in:
Gabe Kangas
2020-10-19 22:22:33 -07:00
parent 226242f07b
commit 205ef8926e
6368 changed files with 0 additions and 603959 deletions

View File

@@ -1,11 +0,0 @@
License
(The MIT License)
Copyright (c) 2014 The cheeriojs contributors
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -1,148 +0,0 @@
/*
Module dependencies
*/
var ElementType = require('domelementtype');
var entities = require('entities');
var unencodedElements = {
__proto__: null,
style: true,
script: true,
xmp: true,
iframe: true,
noembed: true,
noframes: true,
plaintext: true,
noscript: true
};
/*
Format attributes
*/
function formatAttrs(attributes, opts) {
if (!attributes) return;
var output = '',
value;
// Loop through the attributes
for (var key in attributes) {
value = attributes[key];
if (output) {
output += ' ';
}
output += key;
if ((value !== null && value !== '') || opts.xmlMode) {
output += '="' + (opts.decodeEntities ? entities.encodeXML(value) : value) + '"';
}
}
return output;
}
/*
Self-enclosing tags (stolen from node-htmlparser)
*/
var singleTag = {
__proto__: null,
area: true,
base: true,
basefont: true,
br: true,
col: true,
command: true,
embed: true,
frame: true,
hr: true,
img: true,
input: true,
isindex: true,
keygen: true,
link: true,
meta: true,
param: true,
source: true,
track: true,
wbr: true,
};
var render = module.exports = function(dom, opts) {
if (!Array.isArray(dom) && !dom.cheerio) dom = [dom];
opts = opts || {};
var output = '';
for(var i = 0; i < dom.length; i++){
var elem = dom[i];
if (elem.type === 'root')
output += render(elem.children, opts);
else if (ElementType.isTag(elem))
output += renderTag(elem, opts);
else if (elem.type === ElementType.Directive)
output += renderDirective(elem);
else if (elem.type === ElementType.Comment)
output += renderComment(elem);
else if (elem.type === ElementType.CDATA)
output += renderCdata(elem);
else
output += renderText(elem, opts);
}
return output;
};
function renderTag(elem, opts) {
// Handle SVG
if (elem.name === "svg") opts = {decodeEntities: opts.decodeEntities, xmlMode: true};
var tag = '<' + elem.name,
attribs = formatAttrs(elem.attribs, opts);
if (attribs) {
tag += ' ' + attribs;
}
if (
opts.xmlMode
&& (!elem.children || elem.children.length === 0)
) {
tag += '/>';
} else {
tag += '>';
if (elem.children) {
tag += render(elem.children, opts);
}
if (!singleTag[elem.name] || opts.xmlMode) {
tag += '</' + elem.name + '>';
}
}
return tag;
}
function renderDirective(elem) {
return '<' + elem.data + '>';
}
function renderText(elem, opts) {
var data = elem.data || '';
// if entities weren't decoded, no need to encode them back
if (opts.decodeEntities && !(elem.parent && elem.parent.name in unencodedElements)) {
data = entities.encodeXML(data);
}
return data;
}
function renderCdata(elem) {
return '<![CDATA[' + elem.children[0].data + ']]>';
}
function renderComment(elem) {
return '<!--' + elem.data + '-->';
}

View File

@@ -1,71 +0,0 @@
{
"_args": [
[
"dom-serializer@0.1.1",
"/home/runner/work/owncast/owncast/build/javascript"
]
],
"_from": "dom-serializer@0.1.1",
"_id": "dom-serializer@0.1.1",
"_inBundle": false,
"_integrity": "sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA==",
"_location": "/dom-serializer",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "dom-serializer@0.1.1",
"name": "dom-serializer",
"escapedName": "dom-serializer",
"rawSpec": "0.1.1",
"saveSpec": null,
"fetchSpec": "0.1.1"
},
"_requiredBy": [
"/domutils",
"/postcss-inline-svg"
],
"_resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.1.tgz",
"_spec": "0.1.1",
"_where": "/home/runner/work/owncast/owncast/build/javascript",
"author": {
"name": "Felix Boehm",
"email": "me@feedic.com"
},
"bugs": {
"url": "https://github.com/cheeriojs/dom-renderer/issues"
},
"dependencies": {
"domelementtype": "^1.3.0",
"entities": "^1.1.1"
},
"description": "render dom nodes to string",
"devDependencies": {
"cheerio": "*",
"expect.js": "^0.3.1",
"jshint": "^2.9.1-rc1",
"lodash": "^4.17.11",
"mocha": "^5.2.0",
"xyz": "^3.0.0"
},
"files": [
"index.js"
],
"homepage": "https://github.com/cheeriojs/dom-renderer#readme",
"keywords": [
"html",
"xml",
"render"
],
"license": "MIT",
"main": "./index.js",
"name": "dom-serializer",
"repository": {
"type": "git",
"url": "git://github.com/cheeriojs/dom-renderer.git"
},
"scripts": {
"test": "mocha test.js"
},
"version": "0.1.1"
}