schnee effeckt und fehler Korektur

This commit is contained in:
2023-08-14 17:52:24 +02:00
parent 4a843d4936
commit 79af4e9907
6813 changed files with 343821 additions and 356128 deletions

49
node_modules/is-svg/index.js generated vendored
View File

@@ -1,19 +1,42 @@
'use strict';
const {XMLParser, XMLValidator} = require('fast-xml-parser');
function isBinary(buf) {
var isBuf = Buffer.isBuffer(buf);
for (var i = 0; i < 24; i++) {
var charCode = isBuf ? buf[i] : buf.charCodeAt(i);
if (charCode === 65533 || charCode <= 8) {
return true;
}
const isSvg = input => {
if (input === undefined || input === null) {
return false;
}
return false;
}
input = input.toString().trim();
module.exports = function (buf) {
return !isBinary(buf) && /<svg[^>]*>[^]*<\/svg>\s*$/.test(buf);
if (input.length === 0) {
return false;
}
// Has to be `!==` as it can also return an object with error info.
if (XMLValidator.validate(input) !== true) {
return false;
}
let jsonObject;
const parser = new XMLParser();
try {
jsonObject = parser.parse(input);
} catch (_) {
return false;
}
if (!jsonObject) {
return false;
}
if (!('svg' in jsonObject)) {
return false;
}
return true;
};
module.exports = isSvg;
// TODO: Remove this for the next major release
module.exports.default = isSvg;