Installations
npm install sane-domparser-error
Score
88.8
Supply Chain
77.2
Quality
75.1
Maintenance
100
Vulnerability
100
License
Releases
Unable to fetch releases
Developer
cburgmer
Developer Guide
Module System
CommonJS
Min. Node Version
Typescript Support
No
Node Version
0.12.7
NPM Version
2.12.1
Statistics
17 Commits
2 Watching
1 Branches
1 Contributors
Updated on 05 Dec 2018
Languages
JavaScript (98.41%)
HTML (1.59%)
Total Downloads
Cumulative downloads
Total Downloads
1,688,739
Last day
1.6%
1,998
Compared to previous day
Last week
5.4%
10,571
Compared to previous week
Last month
2.4%
44,831
Compared to previous month
Last year
46.5%
502,864
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dev Dependencies
5
sane-domparser-error
Provides sane and machine readable parser errors for DOMParser and XHR (with XMLHttpRequest.responseType = 'document'
).
Why?
DOMParser and XHR currently do not throw an exception if a document could not be parsed, but instead return an error document.
Instead of
1<parsererror xmlns="http://www.mozilla.org/newlayout/xml/parsererror.xml"> 2 XML Parsing Error: prefix not bound to a namespace\n Location: file:////tmp/index.html 3 Line Number 1, Column 57: 4 <sourcetext> 5 <html xmlns="http://www.w3.org/1999/xhtml"><head/><body><namespace:customtag><!-- namespace:customtag--></namespace:customtag></body></html> 6 --------------------------------------------------------^ 7 </sourcetext> 8</parsererror>
you'll receive
1new Error('XML Parsing Error: prefix not bound to a namespace');
Usage
1var saneError = require('sane-domparser-error'); 2 3var xhr = new XMLHttpRequest(); 4xhr.onload = function() { 5 saneError.failOnParseError(xhr.responseXML); 6 // ... the happy path from here ... 7} 8xhr.open("GET", "file.html"); 9xhr.responseType = "document"; 10xhr.send();
and
1var saneError = require('sane-domparser-error'); 2 3var p = new DOMParser(), 4 doc = p.parseFromString(xhtml, "application/xml"); 5 6saneError.failOnParseError(doc); 7// ... the happy path from here ...
Develop
$ npm run-script watchify
$ xdg-open test/test.html
or just
$ npm test
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
Found 0/17 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
license file not detected
Details
- Warn: project does not have a license file
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
61 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-6chw-6frg-f759
- Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw
- Warn: Project is vulnerable to: GHSA-cwfw-4gq5-mrqx
- Warn: Project is vulnerable to: GHSA-g95f-p29q-9xw4
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-x9w5-v3q2-3rhw
- Warn: Project is vulnerable to: GHSA-wg6g-ppvx-927h
- Warn: Project is vulnerable to: GHSA-c6rq-rjc2-86v2
- Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq
- Warn: Project is vulnerable to: GHSA-9q64-mpxx-87fg
- Warn: Project is vulnerable to: GHSA-jc84-3g44-wf2q
- Warn: Project is vulnerable to: GHSA-6vrv-94jv-crrg
- Warn: Project is vulnerable to: GHSA-f9mq-jph6-9mhm
- Warn: Project is vulnerable to: GHSA-h9jc-284h-533g
- Warn: Project is vulnerable to: GHSA-m93v-9qjc-3g79
- Warn: Project is vulnerable to: GHSA-hvf8-h2qh-37m9
- Warn: Project is vulnerable to: GHSA-mpjm-v997-c4h4
- Warn: Project is vulnerable to: GHSA-3p22-ghq8-v749
- Warn: Project is vulnerable to: GHSA-77xc-hjv8-ww97
- Warn: Project is vulnerable to: GHSA-mq8j-3h7h-p8g7
- Warn: Project is vulnerable to: GHSA-p2jh-44qj-pf2v
- Warn: Project is vulnerable to: GHSA-p7v2-p9m8-qqg7
- Warn: Project is vulnerable to: GHSA-7x97-j373-85x5
- Warn: Project is vulnerable to: GHSA-7m48-wc93-9g85
- Warn: Project is vulnerable to: GHSA-qqvq-6xgj-jw8g
- Warn: Project is vulnerable to: GHSA-vh7m-p724-62c2
- Warn: Project is vulnerable to: GHSA-r9p9-mrjm-926w
- Warn: Project is vulnerable to: GHSA-434g-2637-qmqr
- Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m
- Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw
- Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p
- Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747
- Warn: Project is vulnerable to: GHSA-8r6j-v8pm-fqw3
- Warn: Project is vulnerable to: MAL-2023-462
- Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj
- Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37
- Warn: Project is vulnerable to: GHSA-896r-f27r-55mw
- Warn: Project is vulnerable to: GHSA-6c8f-qphg-qjgp
- Warn: Project is vulnerable to: GHSA-f9cm-qmx5-m98h
- Warn: Project is vulnerable to: GHSA-7wpw-2hjm-89gp
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m / GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-fhjf-83wg-r2j9
- Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-4cpg-3vgw-4877
- Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp
- Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-4g88-fppr-53pp
- Warn: Project is vulnerable to: GHSA-4jqc-8m5r-9rpr
- Warn: Project is vulnerable to: GHSA-g4rg-993r-mgx7
- Warn: Project is vulnerable to: GHSA-j44m-qm6p-hp7m
- Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9
- Warn: Project is vulnerable to: GHSA-r628-mhmh-qjhw
- Warn: Project is vulnerable to: GHSA-9r2w-394v-53qc
- Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh
- Warn: Project is vulnerable to: GHSA-qq89-hq3f-393p
- Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
- Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v
Score
1.3
/10
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More