html-dom-parser
Advanced tools
Comparing version
@@ -5,2 +5,6 @@ # Change Log | ||
## [0.3.1](https://github.com/remarkablemark/html-dom-parser/compare/v0.3.0...v0.3.1) (2020-12-13) | ||
<a name="0.3.0"></a> | ||
@@ -7,0 +11,0 @@ # [0.3.0](https://github.com/remarkablemark/html-dom-parser/compare/v0.2.3...v0.3.0) (2020-06-02) |
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : | ||
typeof define === 'function' && define.amd ? define(factory) : | ||
(global = global || self, global.HTMLDOMParser = factory()); | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.HTMLDOMParser = factory()); | ||
}(this, (function () { 'use strict'; | ||
@@ -62,4 +62,4 @@ | ||
* | ||
* @param {String} tagName - The lowercase tag name. | ||
* @return {String|undefined} | ||
* @param {string} tagName - Tag name in lowercase. | ||
* @return {string|undefined} - Case-sensitive tag name. | ||
*/ | ||
@@ -73,4 +73,4 @@ function getCaseSensitiveTagName(tagName) { | ||
* | ||
* @param {NamedNodeMap} attributes - The list of attributes. | ||
* @return {Object} - A map of attribute name to value. | ||
* @param {NamedNodeMap} attributes - List of attributes. | ||
* @return {object} - Map of attribute name to value. | ||
*/ | ||
@@ -92,4 +92,4 @@ function formatAttributes(attributes) { | ||
* | ||
* @param {String} tagName - The lowercase tag name. | ||
* @return {String} - The formatted tag name. | ||
* @param {string} tagName - Lowercase tag name. | ||
* @return {string} - Formatted tag name. | ||
*/ | ||
@@ -108,9 +108,9 @@ function formatTagName(tagName) { | ||
* | ||
* @param {NodeList} nodes - The DOM nodes. | ||
* @param {Object} [parentObj] - The formatted parent node. | ||
* @param {String} [directive] - The directive. | ||
* @return {Object[]} - The formatted DOM object. | ||
* @param {NodeList} nodes - DOM nodes. | ||
* @param {object} [parentNode] - Formatted parent node. | ||
* @param {string} [directive] - Directive. | ||
* @return {DomElement[]} - Formatted DOM object. | ||
*/ | ||
function formatDOM(nodes, parentObj, directive) { | ||
parentObj = parentObj || null; | ||
function formatDOM(nodes, parentNode, directive) { | ||
parentNode = parentNode || null; | ||
@@ -129,3 +129,3 @@ var result = []; | ||
prev: result[i - 1] || null, | ||
parent: parentObj | ||
parent: parentNode | ||
}; | ||
@@ -186,3 +186,3 @@ | ||
prev: null, | ||
parent: parentObj | ||
parent: parentNode | ||
}); | ||
@@ -199,6 +199,6 @@ | ||
/** | ||
* Detects IE with or without version. | ||
* Detects if browser is Internet Explorer. | ||
* | ||
* @param {Number} [version] - The IE version to detect. | ||
* @return {Boolean} - Whether IE or the version has been detected. | ||
* @param {number} [version] - IE version to detect. | ||
* @return {boolean} - Whether IE or the version is detected. | ||
*/ | ||
@@ -341,4 +341,4 @@ function isIE(version) { | ||
* | ||
* @param {string} html - The HTML string. | ||
* @return {NodeList|Array} | ||
* @param {string} html - HTML markup. | ||
* @return {NodeList} | ||
*/ | ||
@@ -408,8 +408,8 @@ function domparser(html) { | ||
/** | ||
* Parses HTML and reformats DOM nodes output. | ||
* Parses HTML string to DOM nodes in browser. | ||
* | ||
* @param {String} html - The HTML string. | ||
* @return {Array} - The formatted DOM nodes. | ||
* @param {String} html - HTML markup. | ||
* @return {DomElement[]} - DOM elements. | ||
*/ | ||
function parseDOM(html) { | ||
function HTMLDOMParser(html) { | ||
if (typeof html !== 'string') { | ||
@@ -440,3 +440,3 @@ throw new TypeError('First argument must be a string'); | ||
var htmlToDomClient = parseDOM; | ||
var htmlToDomClient = HTMLDOMParser; | ||
@@ -443,0 +443,0 @@ return htmlToDomClient; |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).HTMLDOMParser=t()}(this,function(){"use strict";for(var e,t=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussainBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],n={},r=0,a=t.length;r<a;r++)n[(e=t[r]).toLowerCase()]=e;function f(e){for(var t,n={},r=0,a=e.length;r<a;r++)n[(t=e[r]).name]=t.value;return n}function c(e){e=e.toLowerCase();var t=n[e];return t||e}var o,i,s,u={formatAttributes:f,formatDOM:function e(t,n,r){n=n||null;for(var a,o,i,s=[],u=0,m=t.length;u<m;u++){switch(a=t[u],i={next:null,prev:s[u-1]||null,parent:n},(o=s[u-1])&&(o.next=i),"#"!==a.nodeName[0]&&(i.name=c(a.nodeName),i.attribs={},a.attributes&&a.attributes.length&&(i.attribs=f(a.attributes))),a.nodeType){case 1:"script"===i.name||"style"===i.name?i.type=i.name:i.type="tag",i.children=e(a.childNodes,i);break;case 3:i.type="text",i.data=a.nodeValue;break;case 8:i.type="comment",i.data=a.nodeValue}s.push(i)}return r&&(s.unshift({name:r.substring(0,r.indexOf(" ")).toLowerCase(),data:r,type:"directive",next:s[0]?s[0]:null,prev:null,parent:n}),s[1]&&(s[1].prev=s[0])),s},isIE:function(e){return e?document.documentMode===e:/(MSIE |Trident\/|Edge\/)/.test(navigator.userAgent)}},m="html",l="head",d="body",p=/<([a-zA-Z]+[0-9]?)/,g=/<head.*>/i,h=/<body.*>/i,y=/<(area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)(.*?)\/?>/gi,b=u.isIE(9),w=b||u.isIE(),M=function(){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},T=function(){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")};"function"==typeof window.DOMParser&&(o=new window.DOMParser,i=b?"text/xml":"text/html",M=T=function(e,t){return t&&(e="<"+t+">"+e+"</"+t+">"),b&&(e=e.replace(y,"<$1$2$3/>")),o.parseFromString(e,i)}),document.implementation&&(s=document.implementation.createHTMLDocument(w?"html-dom-parser":void 0),M=function(t,e){if(e)return s.documentElement.getElementsByTagName(e)[0].innerHTML=t,s;try{return s.documentElement.innerHTML=t,s}catch(e){if(T)return T(t)}});var v,E=document.createElement("template");E.content&&(v=function(e){return E.innerHTML=e,E.content.childNodes});var N=function(e){var t,n,r,a,o=e.match(p);switch(o&&o[1]&&(t=o[1].toLowerCase()),t){case m:return n=T(e),g.test(e)||(r=n.getElementsByTagName(l)[0])&&r.parentNode.removeChild(r),h.test(e)||(r=n.getElementsByTagName(d)[0])&&r.parentNode.removeChild(r),n.getElementsByTagName(m);case l:case d:return a=M(e).getElementsByTagName(t),h.test(e)&&g.test(e)?a[0].parentNode.childNodes:a;default:return v?v(e):M(e,d).getElementsByTagName(d)[0].childNodes}},L=u.formatDOM,x=u.isIE(9),D=/<(![a-zA-Z\s]+)>/;return function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t,n=e.match(D);return n&&n[1]&&(t=n[1],x&&(e=e.replace(n[0],""))),L(N(e),null,t)}}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).HTMLDOMParser=t()}(this,(function(){"use strict";for(var e,t=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussainBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],n={},r=0,a=t.length;r<a;r++)n[(e=t[r]).toLowerCase()]=e;function o(e){for(var t,n={},r=0,a=e.length;r<a;r++)n[(t=e[r]).name]=t.value;return n}function i(e){var t=function(e){return n[e]}(e=e.toLowerCase());return t||e}var s={formatAttributes:o,formatDOM:function e(t,n,r){n=n||null;for(var a,s,u,f=[],m=0,l=t.length;m<l;m++){switch(a=t[m],u={next:null,prev:f[m-1]||null,parent:n},(s=f[m-1])&&(s.next=u),"#"!==a.nodeName[0]&&(u.name=i(a.nodeName),u.attribs={},a.attributes&&a.attributes.length&&(u.attribs=o(a.attributes))),a.nodeType){case 1:"script"===u.name||"style"===u.name?u.type=u.name:u.type="tag",u.children=e(a.childNodes,u);break;case 3:u.type="text",u.data=a.nodeValue;break;case 8:u.type="comment",u.data=a.nodeValue}f.push(u)}return r&&(f.unshift({name:r.substring(0,r.indexOf(" ")).toLowerCase(),data:r,type:"directive",next:f[0]?f[0]:null,prev:null,parent:n}),f[1]&&(f[1].prev=f[0])),f},isIE:function(e){return e?document.documentMode===e:/(MSIE |Trident\/|Edge\/)/.test(navigator.userAgent)}},u="html",f="head",m="body",l=/<([a-zA-Z]+[0-9]?)/,c=/<head.*>/i,d=/<body.*>/i,p=/<(area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)(.*?)\/?>/gi,g=s.isIE(9),h=g||s.isIE(),y=function(){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},b=function(){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")};if("function"==typeof window.DOMParser){var T=new window.DOMParser,v=g?"text/xml":"text/html";y=b=function(e,t){return t&&(e="<"+t+">"+e+"</"+t+">"),g&&(e=e.replace(p,"<$1$2$3/>")),T.parseFromString(e,v)}}if(document.implementation){var w=document.implementation.createHTMLDocument(h?"html-dom-parser":void 0);y=function(e,t){if(t)return w.documentElement.getElementsByTagName(t)[0].innerHTML=e,w;try{return w.documentElement.innerHTML=e,w}catch(t){if(b)return b(e)}}}var M,E=document.createElement("template");E.content&&(M=function(e){return E.innerHTML=e,E.content.childNodes});var N=function(e){var t,n,r,a,o=e.match(l);switch(o&&o[1]&&(t=o[1].toLowerCase()),t){case u:return n=b(e),c.test(e)||(r=n.getElementsByTagName(f)[0])&&r.parentNode.removeChild(r),d.test(e)||(r=n.getElementsByTagName(m)[0])&&r.parentNode.removeChild(r),n.getElementsByTagName(u);case f:case m:return a=y(e).getElementsByTagName(t),d.test(e)&&c.test(e)?a[0].parentNode.childNodes:a;default:return M?M(e):y(e,m).getElementsByTagName(m)[0].childNodes}},L=s.formatDOM,x=s.isIE(9),D=/<(![a-zA-Z\s]+)>/;return function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t,n=e.match(D);return n&&n[1]&&(t=n[1],x&&(e=e.replace(n[0],""))),L(N(e),null,t)}})); | ||
//# sourceMappingURL=html-dom-parser.min.js.map |
@@ -1,4 +0,3 @@ | ||
// TypeScript Version: 3.3 | ||
// TypeScript Version: 4.1 | ||
import htmlToDomServer from './lib/html-to-dom-server'; | ||
export default htmlToDomServer; | ||
export { default } from './lib/html-to-dom-server'; |
@@ -1,2 +0,2 @@ | ||
// TypeScript Version: 3.3 | ||
// TypeScript Version: 4.1 | ||
@@ -3,0 +3,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
// TypeScript Version: 3.3 | ||
// TypeScript Version: 4.1 | ||
@@ -6,5 +6,5 @@ /** | ||
* | ||
* @param - Raw string of HTML to parse. | ||
* @returns NodeList or empty array. | ||
* @param html - HTML markup. | ||
* @return - NodeList. | ||
*/ | ||
export default function parseDOM(html: string): NodeList | []; | ||
export default function domparser(html: string): NodeList; |
@@ -126,4 +126,4 @@ var utilities = require('./utilities'); | ||
* | ||
* @param {string} html - The HTML string. | ||
* @return {NodeList|Array} | ||
* @param {string} html - HTML markup. | ||
* @return {NodeList} | ||
*/ | ||
@@ -130,0 +130,0 @@ function domparser(html) { |
@@ -1,2 +0,2 @@ | ||
// TypeScript Version: 3.3 | ||
// TypeScript Version: 4.1 | ||
@@ -6,7 +6,7 @@ import { DomElement } from 'domhandler'; | ||
/** | ||
* Parses HTML and reformats DOM nodes output. | ||
* Parses HTML string to DOM nodes in browser. | ||
* | ||
* @param - Raw string of HTML to parse. | ||
* @returns Parsed DomElements. | ||
* @param html - HTML markup. | ||
* @return - DOM elements. | ||
*/ | ||
export default function parseDOM(html: string): DomElement[]; | ||
export default function HTMLDOMParser(html: string): DomElement[]; |
@@ -10,8 +10,8 @@ var domparser = require('./domparser'); | ||
/** | ||
* Parses HTML and reformats DOM nodes output. | ||
* Parses HTML string to DOM nodes in browser. | ||
* | ||
* @param {String} html - The HTML string. | ||
* @return {Array} - The formatted DOM nodes. | ||
* @param {String} html - HTML markup. | ||
* @return {DomElement[]} - DOM elements. | ||
*/ | ||
function parseDOM(html) { | ||
function HTMLDOMParser(html) { | ||
if (typeof html !== 'string') { | ||
@@ -42,2 +42,2 @@ throw new TypeError('First argument must be a string'); | ||
module.exports = parseDOM; | ||
module.exports = HTMLDOMParser; |
@@ -1,2 +0,2 @@ | ||
// TypeScript Version: 3.3 | ||
// TypeScript Version: 4.1 | ||
@@ -6,12 +6,14 @@ import { DomHandlerOptions, DomElement } from 'domhandler'; | ||
/** | ||
* Parses HTML string to DOM nodes (server). | ||
* Parses HTML string to DOM nodes in Node.js. | ||
* | ||
* @remarks | ||
* This is the same method as `require('htmlparser2').parseDOM` | ||
* https://github.com/fb55/htmlparser2/blob/v3.9.1/lib/index.js#L39-L43 | ||
* | ||
* @param - Raw string of HTML to parse. | ||
* @param - Options to pass to domhandler (See https://github.com/fb55/DomHandler#readme). | ||
* @returns Parsed DomElements. | ||
* @param html - HTML markup. | ||
* @param options - Parser options (https://github.com/fb55/domhandler/tree/v2.4.2#readme). | ||
* @return - DOM elements. | ||
*/ | ||
export default function parseDOM(html: string, options?: DomHandlerOptions): DomElement[]; | ||
export default function HTMLDOMParser( | ||
html: string, | ||
options?: DomHandlerOptions | ||
): DomElement[]; |
@@ -5,3 +5,3 @@ var Parser = require('htmlparser2/lib/Parser'); | ||
/** | ||
* Parses HTML string to DOM nodes (server). | ||
* Parses HTML string to DOM nodes in Node.js. | ||
* | ||
@@ -11,7 +11,7 @@ * This is the same method as `require('htmlparser2').parseDOM` | ||
* | ||
* @param {String} html - The HTML string. | ||
* @param {Object} [options] - The parser options. | ||
* @return {Array} - The DOM nodes. | ||
* @param {String} html - HTML markup. | ||
* @param {Object} [options] - Parser options (https://github.com/fb55/domhandler/tree/v2.4.2#readme). | ||
* @return {DomElement[]} - DOM elements. | ||
*/ | ||
function parseDOM(html, options) { | ||
function HTMLDOMParser(html, options) { | ||
if (typeof html !== 'string') { | ||
@@ -30,2 +30,2 @@ throw new TypeError('First argument must be a string.'); | ||
module.exports = parseDOM; | ||
module.exports = HTMLDOMParser; |
@@ -1,2 +0,2 @@ | ||
// TypeScript Version: 3.3 | ||
// TypeScript Version: 4.1 | ||
@@ -8,6 +8,8 @@ import { DomElement } from 'domhandler'; | ||
* | ||
* @param attributes - The list of attributes to format. | ||
* @returns - A map of attribute name to value. | ||
* @param attributes - List of attributes. | ||
* @return - Map of attribute name to value. | ||
*/ | ||
export function formatAttributes(attributes: NamedNodeMap): {[name: string]: string}; | ||
export function formatAttributes( | ||
attributes: NamedNodeMap | ||
): { [name: string]: string }; | ||
@@ -17,14 +19,19 @@ /** | ||
* | ||
* @param nodes - The DOM nodes to format. | ||
* @param parentObj - The formatted parent node of the given DOM nodes. | ||
* @param directive - The directive. | ||
* @param nodes - DOM nodes. | ||
* @param parentNode - Formatted parent node. | ||
* @param directive - Directive. | ||
* @return - DOM elements. | ||
*/ | ||
export function formatDOM(nodes: NodeList, parentObj?: DomElement, directive?: string): DomElement[]; | ||
export function formatDOM( | ||
nodes: NodeList, | ||
parentNode?: DomElement, | ||
directive?: string | ||
): DomElement[]; | ||
/** | ||
* Detects IE with or without version. | ||
* Detects if browser is Internet Explorer. | ||
* | ||
* @param version - The IE version to detect. | ||
* @returns - Whether IE or the version has been detected. | ||
* @param version - IE version to detect. | ||
* @return - Whether IE or the version is detected. | ||
*/ | ||
export function isIE(version?: number): boolean; |
@@ -13,4 +13,4 @@ var CASE_SENSITIVE_TAG_NAMES = require('./constants').CASE_SENSITIVE_TAG_NAMES; | ||
* | ||
* @param {String} tagName - The lowercase tag name. | ||
* @return {String|undefined} | ||
* @param {string} tagName - Tag name in lowercase. | ||
* @return {string|undefined} - Case-sensitive tag name. | ||
*/ | ||
@@ -24,4 +24,4 @@ function getCaseSensitiveTagName(tagName) { | ||
* | ||
* @param {NamedNodeMap} attributes - The list of attributes. | ||
* @return {Object} - A map of attribute name to value. | ||
* @param {NamedNodeMap} attributes - List of attributes. | ||
* @return {object} - Map of attribute name to value. | ||
*/ | ||
@@ -43,4 +43,4 @@ function formatAttributes(attributes) { | ||
* | ||
* @param {String} tagName - The lowercase tag name. | ||
* @return {String} - The formatted tag name. | ||
* @param {string} tagName - Lowercase tag name. | ||
* @return {string} - Formatted tag name. | ||
*/ | ||
@@ -59,9 +59,9 @@ function formatTagName(tagName) { | ||
* | ||
* @param {NodeList} nodes - The DOM nodes. | ||
* @param {Object} [parentObj] - The formatted parent node. | ||
* @param {String} [directive] - The directive. | ||
* @return {Object[]} - The formatted DOM object. | ||
* @param {NodeList} nodes - DOM nodes. | ||
* @param {object} [parentNode] - Formatted parent node. | ||
* @param {string} [directive] - Directive. | ||
* @return {DomElement[]} - Formatted DOM object. | ||
*/ | ||
function formatDOM(nodes, parentObj, directive) { | ||
parentObj = parentObj || null; | ||
function formatDOM(nodes, parentNode, directive) { | ||
parentNode = parentNode || null; | ||
@@ -80,3 +80,3 @@ var result = []; | ||
prev: result[i - 1] || null, | ||
parent: parentObj | ||
parent: parentNode | ||
}; | ||
@@ -137,3 +137,3 @@ | ||
prev: null, | ||
parent: parentObj | ||
parent: parentNode | ||
}); | ||
@@ -150,6 +150,6 @@ | ||
/** | ||
* Detects IE with or without version. | ||
* Detects if browser is Internet Explorer. | ||
* | ||
* @param {Number} [version] - The IE version to detect. | ||
* @return {Boolean} - Whether IE or the version has been detected. | ||
* @param {number} [version] - IE version to detect. | ||
* @return {boolean} - Whether IE or the version is detected. | ||
*/ | ||
@@ -156,0 +156,0 @@ function isIE(version) { |
{ | ||
"name": "html-dom-parser", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "HTML to DOM parser.", | ||
@@ -17,8 +17,5 @@ "author": "Mark <mark@remarkablemark.org>", | ||
"test:client": "npm run test:client:watch -- --single-run", | ||
"test:client:build": "webpack node_modules/htmlparser2/lib/index.js -o dist/htmlparser2.js --mode production --output-library htmlparser2 --output-library-target umd", | ||
"test:client:setup": "test -f dist/htmlparser2.js || npm run test:client:build", | ||
"test:client:watch": "npm run test:client:setup && karma start", | ||
"test:server": "mocha test/server", | ||
"test:server:coverage": "nyc npm run test:server", | ||
"test:server:coverage:report": "nyc report --reporter=html" | ||
"test:client:build": "webpack --config webpack.test.config.js", | ||
"test:client:watch": "npm run test:client:build && karma start", | ||
"test:server": "nyc mocha test/server" | ||
}, | ||
@@ -46,14 +43,14 @@ "repository": { | ||
"devDependencies": { | ||
"@commitlint/cli": "^8.2.0", | ||
"@commitlint/config-conventional": "^8.2.0", | ||
"@rollup/plugin-commonjs": "^12.0.0", | ||
"@rollup/plugin-node-resolve": "^8.0.0", | ||
"@commitlint/cli": "^11.0.0", | ||
"@commitlint/config-conventional": "^11.0.0", | ||
"@rollup/plugin-commonjs": "^17.0.0", | ||
"@rollup/plugin-node-resolve": "^11.0.0", | ||
"chai": "^4.2.0", | ||
"dtslint": "^3.6.9", | ||
"eslint": "^7.1.0", | ||
"eslint-plugin-prettier": "^3.1.1", | ||
"dtslint": "^4.0.6", | ||
"eslint": "^7.15.0", | ||
"eslint-plugin-prettier": "^3.2.0", | ||
"html-minifier": "^4.0.0", | ||
"husky": "^4.2.5", | ||
"husky": "^4.3.5", | ||
"jsdomify": "^3.1.1", | ||
"karma": "^5.0.9", | ||
"karma": "^5.2.3", | ||
"karma-chai": "^0.1.0", | ||
@@ -64,16 +61,15 @@ "karma-chrome-launcher": "^3.1.0", | ||
"karma-mocha-reporter": "^2.2.5", | ||
"karma-phantomjs-launcher": "^1.0.4", | ||
"lint-staged": "^10.2.7", | ||
"mocha": "^7.2.0", | ||
"lint-staged": "^10.5.3", | ||
"mocha": "^8.2.1", | ||
"mock-require": "^3.0.3", | ||
"npm-run-all": "^4.1.5", | ||
"nyc": "^15.1.0", | ||
"prettier": "^2.0.5", | ||
"rollup": "^2.12.1", | ||
"rollup-plugin-uglify": "^6.0.4", | ||
"sinon": "^9.0.2", | ||
"prettier": "^2.2.1", | ||
"rollup": "^2.34.2", | ||
"rollup-plugin-terser": "^7.0.2", | ||
"sinon": "^9.2.2", | ||
"standard-version": "^5", | ||
"typescript": "^3.9.3", | ||
"webpack": "^4.41.2", | ||
"webpack-cli": "^3.3.10" | ||
"typescript": "^4.1.3", | ||
"webpack": "^4.44.2", | ||
"webpack-cli": "^3.3.12" | ||
}, | ||
@@ -80,0 +76,0 @@ "files": [ |
@@ -6,3 +6,3 @@ # html-dom-parser | ||
[](https://www.npmjs.com/package/html-dom-parser) | ||
[](https://travis-ci.org/remarkablemark/html-dom-parser) | ||
[](https://github.com/remarkablemark/html-dom-parser/actions?query=workflow%3Abuild) | ||
[](https://coveralls.io/github/remarkablemark/html-dom-parser?branch=master) | ||
@@ -114,17 +114,8 @@ [](https://david-dm.org/remarkablemark/html-dom-parser) | ||
Run server tests with coverage: | ||
Generate HTML coverage report for server tests: | ||
```sh | ||
$ npm run test:server:coverage | ||
# generate html report | ||
$ npm run test:server:coverage:report | ||
$ npx nyc report --reporter=html | ||
``` | ||
Run client tests: | ||
```sh | ||
$ npm run test:client | ||
``` | ||
Lint files: | ||
@@ -158,2 +149,3 @@ | ||
- [htmlparser2](https://github.com/fb55/htmlparser2) | ||
- [domhandler](https://github.com/fb55/domhandler) | ||
@@ -160,0 +152,0 @@ ## License |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
30
-3.23%872
1.04%78919
-0.1%152
-5%