This commit is contained in:
Yamozha
2021-04-02 02:24:13 +03:00
parent c23950b545
commit 7256d79e2c
31493 changed files with 3036630 additions and 0 deletions

21
node_modules/xml-parse-from-string/LICENSE.md generated vendored Normal file
View File

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2015 Jam3
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.

35
node_modules/xml-parse-from-string/README.md generated vendored Normal file
View File

@ -0,0 +1,35 @@
# xml-parse-from-string
[![stable](http://badges.github.io/stability-badges/dist/stable.svg)](http://github.com/badges/stability-badges)
A light browser wrapper around `DOMParser.parseFromString` for XML, with fallback for IE8 and other browsers.
- attempts to use DOMParser with `"application/xml"`
- falls back to `ActiveXObject('Microsoft.XMLDOM')`
- then falls back to `createElement` / `innerHTML`
```js
var parseXML = require('xml-parse-from-string')
var str = '<root><foobar id="blah"></foobar></root>'
var doc = parseXML(str)
var tag = doc.getElementsByTagName('foobar')[0]
console.log(tag.getAttribute('id')) // -> "blah"
```
Be wary of subtle differences between implementations, such as case-sensitivity in `attribute.nodeName`.
PRs for Node version welcome.
## Usage
[![NPM](https://nodei.co/npm/xml-parse-from-string.png)](https://www.npmjs.com/package/xml-parse-from-string)
#### `root = parse(str)`
Parses the string as XML and returns the `root` element as a DOM element, so you can do operations similar to `document.getElementById`, `document.getElementsByTagName`, and so forth.
## License
MIT, see [LICENSE.md](http://github.com/Jam3/xml-parse-from-string/blob/master/LICENSE.md) for details.

27
node_modules/xml-parse-from-string/index.js generated vendored Normal file
View File

@ -0,0 +1,27 @@
module.exports = (function xmlparser() {
//common browsers
if (typeof self.DOMParser !== 'undefined') {
return function(str) {
var parser = new self.DOMParser()
return parser.parseFromString(str, 'application/xml')
}
}
//IE8 fallback
if (typeof self.ActiveXObject !== 'undefined'
&& new self.ActiveXObject('Microsoft.XMLDOM')) {
return function(str) {
var xmlDoc = new self.ActiveXObject("Microsoft.XMLDOM")
xmlDoc.async = "false"
xmlDoc.loadXML(str)
return xmlDoc
}
}
//last resort fallback
return function(str) {
var div = document.createElement('div')
div.innerHTML = str
return div
}
})()

45
node_modules/xml-parse-from-string/package.json generated vendored Normal file
View File

@ -0,0 +1,45 @@
{
"name": "xml-parse-from-string",
"version": "1.0.1",
"description": "DOMParser.parseFromString for XML with IE8 fallback",
"main": "index.js",
"license": "MIT",
"author": {
"name": "Matt DesLauriers",
"email": "dave.des@gmail.com",
"url": "https://github.com/mattdesl"
},
"dependencies": {},
"devDependencies": {
"brfs": "^1.4.0",
"browserify": "^9.0.3",
"faucet": "0.0.1",
"tape": "^3.5.0",
"testling": "^1.7.1"
},
"scripts": {
"test": "browserify test.js -t brfs | testling | faucet"
},
"keywords": [
"ie8",
"fallback",
"dom",
"parser",
"DOMParser",
"xml",
"string",
"parse",
"browser",
"browserify",
"webpack",
"activeXObject"
],
"repository": {
"type": "git",
"url": "git://github.com/Jam3/xml-parse-from-string.git"
},
"homepage": "https://github.com/Jam3/xml-parse-from-string",
"bugs": {
"url": "https://github.com/Jam3/xml-parse-from-string/issues"
}
}