Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

readability-hash

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

readability-hash - npm Package Compare versions

Comparing version 1.1.3 to 1.1.4

2

dist/main.js

@@ -1,2 +0,2 @@

"use strict";function Readability(e,t){if(t&&t.documentElement)e=t,t=arguments[2];else if(!e||!e.documentElement)throw new Error("First argument to Readability constructor should be a document object.");var i;t=t||{},this._doc=e,this._articleTitle=null,this._articleByline=null,this._articleDir=null,this._attempts=[],this._debug=!!t.debug,this._maxElemsToParse=t.maxElemsToParse||this.DEFAULT_MAX_ELEMS_TO_PARSE,this._nbTopCandidates=t.nbTopCandidates||this.DEFAULT_N_TOP_CANDIDATES,this._charThreshold=t.charThreshold||this.DEFAULT_CHAR_THRESHOLD,this._classesToPreserve=this.CLASSES_TO_PRESERVE.concat(t.classesToPreserve||[]),this._flags=this.FLAG_STRIP_UNLIKELYS|this.FLAG_WEIGHT_CLASSES|this.FLAG_CLEAN_CONDITIONALLY,this._debug?(i=function(e){var t=e.nodeName+" ";if(e.nodeType==e.TEXT_NODE)return t+'("'+e.textContent+'")';var i=e.className&&"."+e.className.replace(/ /g,"."),n="";return e.id?n="(#"+e.id+i+")":i&&(n="("+i+")"),t+n},this.log=function(){if("undefined"!=typeof dump){var e=Array.prototype.map.call(arguments,function(e){return e&&e.nodeName?i(e):e}).join(" ");dump("Reader: (Readability) "+e+"\n")}else if("undefined"!=typeof console){var t=["Reader: (Readability) "].concat(arguments);console.log.apply(console,t)}}):this.log=function(){}}Object.defineProperty(exports,"__esModule",{value:!0}),Readability.prototype={FLAG_STRIP_UNLIKELYS:1,FLAG_WEIGHT_CLASSES:2,FLAG_CLEAN_CONDITIONALLY:4,ELEMENT_NODE:1,TEXT_NODE:3,DEFAULT_MAX_ELEMS_TO_PARSE:0,DEFAULT_N_TOP_CANDIDATES:5,DEFAULT_TAGS_TO_SCORE:"section,h2,h3,h4,h5,h6,p,td,pre".toUpperCase().split(","),DEFAULT_CHAR_THRESHOLD:500,REGEXPS:{unlikelyCandidates:/-ad-|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|foot|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|main|shadow/i,positive:/article|body|content|entry|hentry|h-entry|main|page|pagination|post|text|blog|story/i,negative:/hidden|^hid$| hid$| hid |^hid |banner|combx|comment|com-|contact|foot|footer|footnote|masthead|media|meta|outbrain|promo|related|scroll|share|shoutbox|sidebar|skyscraper|sponsor|shopping|tags|tool|widget/i,extraneous:/print|archive|comment|discuss|e[\-]?mail|share|reply|all|login|sign|single|utility/i,byline:/byline|author|dateline|writtenby|p-author/i,replaceFonts:/<(\/?)font[^>]*>/gi,normalize:/\s{2,}/g,videos:/\/\/(www\.)?(dailymotion|youtube|youtube-nocookie|player\.vimeo)\.com/i,nextLink:/(next|weiter|continue|>([^\|]|$)|»([^\|]|$))/i,prevLink:/(prev|earl|old|new|<|«)/i,whitespace:/^\s*$/,hasContent:/\S$/},DIV_TO_P_ELEMS:["A","BLOCKQUOTE","DL","DIV","IMG","OL","P","PRE","TABLE","UL","SELECT"],ALTER_TO_DIV_EXCEPTIONS:["DIV","ARTICLE","SECTION","P"],PRESENTATIONAL_ATTRIBUTES:["align","background","bgcolor","border","cellpadding","cellspacing","frame","hspace","rules","style","valign","vspace"],DEPRECATED_SIZE_ATTRIBUTE_ELEMS:["TABLE","TH","TD","HR","PRE"],PHRASING_ELEMS:["ABBR","AUDIO","B","BDO","BR","BUTTON","CITE","CODE","DATA","DATALIST","DFN","EM","EMBED","I","IMG","INPUT","KBD","LABEL","MARK","MATH","METER","NOSCRIPT","OBJECT","OUTPUT","PROGRESS","Q","RUBY","SAMP","SCRIPT","SELECT","SMALL","SPAN","STRONG","SUB","SUP","TEXTAREA","TIME","VAR","WBR"],CLASSES_TO_PRESERVE:["page"],_postProcessContent:function(e){this._fixRelativeUris(e),this._cleanClasses(e)},_removeNodes:function(e,t){for(var i=e.length-1;i>=0;i--){var n=e[i],a=n.parentNode;a&&(t&&!t.call(this,n,i,e)||a.removeChild(n))}},_replaceNodeTags:function(e,t){for(var i=e.length-1;i>=0;i--){var n=e[i];this._setNodeTag(n,t)}},_forEachNode:function(e,t){Array.prototype.forEach.call(e,t,this)},_someNode:function(e,t){return Array.prototype.some.call(e,t,this)},_everyNode:function(e,t){return Array.prototype.every.call(e,t,this)},_concatNodeLists:function(){var e=Array.prototype.slice,t=e.call(arguments).map(function(t){return e.call(t)});return Array.prototype.concat.apply([],t)},_getAllNodesWithTag:function(e,t){return e.querySelectorAll?e.querySelectorAll(t.join(",")):[].concat.apply([],t.map(function(t){var i=e.getElementsByTagName(t);return Array.isArray(i)?i:Array.from(i)}))},_cleanClasses:function(e){var t=this._classesToPreserve,i=(e.getAttribute("class")||"").split(/\s+/).filter(function(e){return-1!=t.indexOf(e)}).join(" ");for(i?e.setAttribute("class",i):e.removeAttribute("class"),e=e.firstElementChild;e;e=e.nextElementSibling)this._cleanClasses(e)},_fixRelativeUris:function(e){var t=this._doc.baseURI,i=this._doc.documentURI;function n(e){if(t==i&&"#"==e.charAt(0))return e;try{return new URL(e,t).href}catch(e){}return e}var a=e.getElementsByTagName("a");this._forEachNode(a,function(e){var t=e.getAttribute("href");if(t)if(0===t.indexOf("javascript:")){var i=this._doc.createTextNode(e.textContent);e.parentNode.replaceChild(i,e)}else e.setAttribute("href",n(t))});var r=e.getElementsByTagName("img");this._forEachNode(r,function(e){var t=e.getAttribute("src");t&&e.setAttribute("src",n(t))})},_getArticleTitle:function(){var e=this._doc,t="",i="";try{"string"!=typeof(t=i=e.title.trim())&&(t=i=this._getInnerText(e.getElementsByTagName("title")[0]))}catch(e){}var n=!1;function a(e){return e.split(/\s+/).length}if(/ [\|\-\\\/>»] /.test(t))n=/ [\\\/>»] /.test(t),a(t=i.replace(/(.*)[\|\-\\\/>»] .*/gi,"$1"))<3&&(t=i.replace(/[^\|\-\\\/>»]*[\|\-\\\/>»](.*)/gi,"$1"));else if(-1!==t.indexOf(": ")){var r=this._concatNodeLists(e.getElementsByTagName("h1"),e.getElementsByTagName("h2")),s=t.trim();this._someNode(r,function(e){return e.textContent.trim()===s})||(a(t=i.substring(i.lastIndexOf(":")+1))<3?t=i.substring(i.indexOf(":")+1):a(i.substr(0,i.indexOf(":")))>5&&(t=i))}else if(t.length>150||t.length<15){var o=e.getElementsByTagName("h1");1===o.length&&(t=this._getInnerText(o[0]))}var l=a(t=t.trim());return l<=4&&(!n||l!=a(i.replace(/[\|\-\\\/>»]+/g,""))-1)&&(t=i),t},_prepDocument:function(){var e=this._doc;this._removeNodes(e.getElementsByTagName("style")),e.body&&this._replaceBrs(e.body),this._replaceNodeTags(e.getElementsByTagName("font"),"SPAN")},_nextElement:function(e){for(var t=e;t&&t.nodeType!=this.ELEMENT_NODE&&this.REGEXPS.whitespace.test(t.textContent);)t=t.nextSibling;return t},_replaceBrs:function(e){this._forEachNode(this._getAllNodesWithTag(e,["br"]),function(e){for(var t=e.nextSibling,i=!1;(t=this._nextElement(t))&&"BR"==t.tagName;){i=!0;var n=t.nextSibling;t.parentNode.removeChild(t),t=n}if(i){var a=this._doc.createElement("p");for(e.parentNode.replaceChild(a,e),t=a.nextSibling;t;){if("BR"==t.tagName){var r=this._nextElement(t.nextSibling);if(r&&"BR"==r.tagName)break}if(!this._isPhrasingContent(t))break;var s=t.nextSibling;a.appendChild(t),t=s}for(;a.lastChild&&this._isWhitespace(a.lastChild);)a.removeChild(a.lastChild);"P"===a.parentNode.tagName&&this._setNodeTag(a.parentNode,"DIV")}})},_setNodeTag:function(e,t){if(this.log("_setNodeTag",e,t),e.__JSDOMParser__)return e.localName=t.toLowerCase(),e.tagName=t.toUpperCase(),e;for(var i=e.ownerDocument.createElement(t);e.firstChild;)i.appendChild(e.firstChild);e.parentNode.replaceChild(i,e),e.readability&&(i.readability=e.readability);for(var n=0;n<e.attributes.length;n++)i.setAttribute(e.attributes[n].name,e.attributes[n].value);return i},_prepArticle:function(e){this._cleanStyles(e),this._markDataTables(e),this._cleanConditionally(e,"form"),this._cleanConditionally(e,"fieldset"),this._clean(e,"object"),this._clean(e,"embed"),this._clean(e,"h1"),this._clean(e,"footer"),this._clean(e,"link"),this._clean(e,"aside"),this._forEachNode(e.children,function(e){this._cleanMatchedNodes(e,/share/)});var t=e.getElementsByTagName("h2");if(1===t.length){var i=(t[0].textContent.length-this._articleTitle.length)/this._articleTitle.length;if(Math.abs(i)<.5){(i>0?t[0].textContent.includes(this._articleTitle):this._articleTitle.includes(t[0].textContent))&&this._clean(e,"h2")}}this._clean(e,"iframe"),this._clean(e,"input"),this._clean(e,"textarea"),this._clean(e,"select"),this._clean(e,"button"),this._cleanHeaders(e),this._cleanConditionally(e,"table"),this._cleanConditionally(e,"ul"),this._cleanConditionally(e,"div"),this._removeNodes(e.getElementsByTagName("p"),function(e){return 0===e.getElementsByTagName("img").length+e.getElementsByTagName("embed").length+e.getElementsByTagName("object").length+e.getElementsByTagName("iframe").length&&!this._getInnerText(e,!1)}),this._forEachNode(this._getAllNodesWithTag(e,["br"]),function(e){var t=this._nextElement(e.nextSibling);t&&"P"==t.tagName&&e.parentNode.removeChild(e)}),this._forEachNode(this._getAllNodesWithTag(e,["table"]),function(e){var t=this._hasSingleTagInsideElement(e,"TBODY")?e.firstElementChild:e;if(this._hasSingleTagInsideElement(t,"TR")){var i=t.firstElementChild;if(this._hasSingleTagInsideElement(i,"TD")){var n=i.firstElementChild;n=this._setNodeTag(n,this._everyNode(n.childNodes,this._isPhrasingContent)?"P":"DIV"),e.parentNode.replaceChild(n,e)}}})},_initializeNode:function(e){switch(e.readability={contentScore:0},e.tagName){case"DIV":e.readability.contentScore+=5;break;case"PRE":case"TD":case"BLOCKQUOTE":e.readability.contentScore+=3;break;case"ADDRESS":case"OL":case"UL":case"DL":case"DD":case"DT":case"LI":case"FORM":e.readability.contentScore-=3;break;case"H1":case"H2":case"H3":case"H4":case"H5":case"H6":case"TH":e.readability.contentScore-=5}e.readability.contentScore+=this._getClassWeight(e)},_removeAndGetNext:function(e){var t=this._getNextNode(e,!0);return e.parentNode.removeChild(e),t},_getNextNode:function(e,t){if(!t&&e.firstElementChild)return e.firstElementChild;if(e.nextElementSibling)return e.nextElementSibling;do{e=e.parentNode}while(e&&!e.nextElementSibling);return e&&e.nextElementSibling},_checkByline:function(e,t){if(this._articleByline)return!1;if(void 0!==e.getAttribute)var i=e.getAttribute("rel");return!("author"!==i&&!this.REGEXPS.byline.test(t)||!this._isValidByline(e.textContent))&&(this._articleByline=e.textContent.trim(),!0)},_getNodeAncestors:function(e,t){t=t||0;for(var i=0,n=[];e.parentNode&&(n.push(e.parentNode),!t||++i!==t);)e=e.parentNode;return n},_grabArticle:function(e){this.log("**** grabArticle ****");var t=this._doc,i=null!==e;if(!(e=e||this._doc.body))return this.log("No body found in document. Abort."),null;for(var n=e.innerHTML;;){for(var a=this._flagIsActive(this.FLAG_STRIP_UNLIKELYS),r=[],s=this._doc.documentElement;s;){var o=s.className+" "+s.id;if(this._isProbablyVisible(s))if(this._checkByline(s,o))s=this._removeAndGetNext(s);else if(a&&this.REGEXPS.unlikelyCandidates.test(o)&&!this.REGEXPS.okMaybeItsACandidate.test(o)&&"BODY"!==s.tagName&&"A"!==s.tagName)this.log("Removing unlikely candidate - "+o),s=this._removeAndGetNext(s);else if("DIV"!==s.tagName&&"SECTION"!==s.tagName&&"HEADER"!==s.tagName&&"H1"!==s.tagName&&"H2"!==s.tagName&&"H3"!==s.tagName&&"H4"!==s.tagName&&"H5"!==s.tagName&&"H6"!==s.tagName||!this._isElementWithoutContent(s)){if(-1!==this.DEFAULT_TAGS_TO_SCORE.indexOf(s.tagName)&&r.push(s),"DIV"===s.tagName){for(var l=null,h=s.firstChild;h;){var c=h.nextSibling;if(this._isPhrasingContent(h))null!==l?l.appendChild(h):this._isWhitespace(h)||(l=t.createElement("p"),s.replaceChild(l,h),l.appendChild(h));else if(null!==l){for(;l.lastChild&&this._isWhitespace(l.lastChild);)l.removeChild(l.lastChild);l=null}h=c}if(this._hasSingleTagInsideElement(s,"P")&&this._getLinkDensity(s)<.25){var d=s.children[0];s.parentNode.replaceChild(d,s),s=d,r.push(s)}else this._hasChildBlockElement(s)||(s=this._setNodeTag(s,"P"),r.push(s))}s=this._getNextNode(s)}else s=this._removeAndGetNext(s);else this.log("Removing hidden node - "+o),s=this._removeAndGetNext(s)}var g=[];this._forEachNode(r,function(e){if(e.parentNode&&void 0!==e.parentNode.tagName){var t=this._getInnerText(e);if(!(t.length<25)){var i=this._getNodeAncestors(e,3);if(0!==i.length){var n=0;n+=1,n+=t.split(",").length,n+=Math.min(Math.floor(t.length/100),3),this._forEachNode(i,function(e,t){if(e.tagName&&e.parentNode&&void 0!==e.parentNode.tagName){if(void 0===e.readability&&(this._initializeNode(e),g.push(e)),0===t)var i=1;else i=1===t?2:3*t;e.readability.contentScore+=n/i}})}}}});for(var _=[],u=0,m=g.length;u<m;u+=1){var f=g[u],N=f.readability.contentScore*(1-this._getLinkDensity(f));f.readability.contentScore=N,this.log("Candidate:",f,"with score "+N);for(var E=0;E<this._nbTopCandidates;E++){var p=_[E];if(!p||N>p.readability.contentScore){_.splice(E,0,f),_.length>this._nbTopCandidates&&_.pop();break}}}var T,b=_[0]||null,v=!1;if(null===b||"BODY"===b.tagName){b=t.createElement("DIV"),v=!0;for(var y=e.childNodes;y.length;)this.log("Moving child out:",y[0]),b.appendChild(y[0]);e.appendChild(b),this._initializeNode(b)}else if(b){for(var A=[],C=1;C<_.length;C++)_[C].readability.contentScore/b.readability.contentScore>=.75&&A.push(this._getNodeAncestors(_[C]));if(A.length>=3)for(T=b.parentNode;"BODY"!==T.tagName;){for(var S=0,L=0;L<A.length&&S<3;L++)S+=Number(A[L].includes(T));if(S>=3){b=T;break}T=T.parentNode}b.readability||this._initializeNode(b),T=b.parentNode;for(var x=b.readability.contentScore,I=x/3;"BODY"!==T.tagName;)if(T.readability){var D=T.readability.contentScore;if(D<I)break;if(D>x){b=T;break}x=T.readability.contentScore,T=T.parentNode}else T=T.parentNode;for(T=b.parentNode;"BODY"!=T.tagName&&1==T.children.length;)T=(b=T).parentNode;b.readability||this._initializeNode(b)}var R=t.createElement("DIV");i&&(R.id="readability-content");for(var B=Math.max(10,.2*b.readability.contentScore),O=(T=b.parentNode).children,P=0,M=O.length;P<M;P++){var G=O[P],H=!1;if(this.log("Looking at sibling node:",G,G.readability?"with score "+G.readability.contentScore:""),this.log("Sibling has score",G.readability?G.readability.contentScore:"Unknown"),G===b)H=!0;else{var w=0;if(G.className===b.className&&""!==b.className&&(w+=.2*b.readability.contentScore),G.readability&&G.readability.contentScore+w>=B)H=!0;else if("P"===G.nodeName){var k=this._getLinkDensity(G),U=this._getInnerText(G),F=U.length;F>80&&k<.25?H=!0:F<80&&F>0&&0===k&&-1!==U.search(/\.( |$)/)&&(H=!0)}}H&&(this.log("Appending node:",G),-1===this.ALTER_TO_DIV_EXCEPTIONS.indexOf(G.nodeName)&&(this.log("Altering sibling:",G,"to div."),G=this._setNodeTag(G,"DIV")),R.appendChild(G),P-=1,M-=1)}if(this._debug&&this.log("Article content pre-prep: "+R.innerHTML),this._prepArticle(R),this._debug&&this.log("Article content post-prep: "+R.innerHTML),v)b.id="readability-page-1",b.className="page";else{var X=t.createElement("DIV");X.id="readability-page-1",X.className="page";for(var V=R.childNodes;V.length;)X.appendChild(V[0]);R.appendChild(X)}this._debug&&this.log("Article content after paging: "+R.innerHTML);var W=!0,Y=this._getInnerText(R,!0).length;if(Y<this._charThreshold)if(W=!1,e.innerHTML=n,this._flagIsActive(this.FLAG_STRIP_UNLIKELYS))this._removeFlag(this.FLAG_STRIP_UNLIKELYS),this._attempts.push({articleContent:R,textLength:Y});else if(this._flagIsActive(this.FLAG_WEIGHT_CLASSES))this._removeFlag(this.FLAG_WEIGHT_CLASSES),this._attempts.push({articleContent:R,textLength:Y});else if(this._flagIsActive(this.FLAG_CLEAN_CONDITIONALLY))this._removeFlag(this.FLAG_CLEAN_CONDITIONALLY),this._attempts.push({articleContent:R,textLength:Y});else{if(this._attempts.push({articleContent:R,textLength:Y}),this._attempts.sort(function(e,t){return e.textLength<t.textLength}),!this._attempts[0].textLength)return null;R=this._attempts[0].articleContent,W=!0}if(W){var j=[T,b].concat(this._getNodeAncestors(T));return this._someNode(j,function(e){if(!e.tagName)return!1;var t=e.getAttribute("dir");return!!t&&(this._articleDir=t,!0)}),R}}},_isValidByline:function(e){return("string"==typeof e||e instanceof String)&&((e=e.trim()).length>0&&e.length<100)},_getArticleMetadata:function(){var e={},t={},i=this._doc.getElementsByTagName("meta"),n=/^\s*((twitter)\s*:\s*)?(description|title)\s*$/gi,a=/^\s*og\s*:\s*(description|title)\s*$/gi;return this._forEachNode(i,function(i){var r=i.getAttribute("name"),s=i.getAttribute("property");if(-1===[r,s].indexOf("author")){var o=null;if(n.test(r)?o=r:a.test(s)&&(o=s),o){var l=i.getAttribute("content");l&&(o=o.toLowerCase().replace(/\s/g,""),t[o]=l.trim())}}else e.byline=i.getAttribute("content")}),"description"in t?e.excerpt=t.description:"og:description"in t?e.excerpt=t["og:description"]:"twitter:description"in t&&(e.excerpt=t["twitter:description"]),e.title=this._getArticleTitle(),e.title||("og:title"in t?e.title=t["og:title"]:"twitter:title"in t&&(e.title=t["twitter:title"])),e},_removeScripts:function(e){this._removeNodes(e.getElementsByTagName("script"),function(e){return e.nodeValue="",e.removeAttribute("src"),!0}),this._removeNodes(e.getElementsByTagName("noscript"))},_hasSingleTagInsideElement:function(e,t){return 1==e.children.length&&e.children[0].tagName===t&&!this._someNode(e.childNodes,function(e){return e.nodeType===this.TEXT_NODE&&this.REGEXPS.hasContent.test(e.textContent)})},_isElementWithoutContent:function(e){return e.nodeType===this.ELEMENT_NODE&&0==e.textContent.trim().length&&(0==e.children.length||e.children.length==e.getElementsByTagName("br").length+e.getElementsByTagName("hr").length)},_hasChildBlockElement:function(e){return this._someNode(e.childNodes,function(e){return-1!==this.DIV_TO_P_ELEMS.indexOf(e.tagName)||this._hasChildBlockElement(e)})},_isPhrasingContent:function(e){return e.nodeType===this.TEXT_NODE||-1!==this.PHRASING_ELEMS.indexOf(e.tagName)||("A"===e.tagName||"DEL"===e.tagName||"INS"===e.tagName)&&this._everyNode(e.childNodes,this._isPhrasingContent)},_isWhitespace:function(e){return e.nodeType===this.TEXT_NODE&&0===e.textContent.trim().length||e.nodeType===this.ELEMENT_NODE&&"BR"===e.tagName},_getInnerText:function(e,t){t=void 0===t||t;var i=e.textContent.trim();return t?i.replace(this.REGEXPS.normalize," "):i},_getCharCount:function(e,t){return t=t||",",this._getInnerText(e).split(t).length-1},_cleanStyles:function(e){if(e&&"svg"!==e.tagName.toLowerCase()){for(var t=0;t<this.PRESENTATIONAL_ATTRIBUTES.length;t++)e.removeAttribute(this.PRESENTATIONAL_ATTRIBUTES[t]);-1!==this.DEPRECATED_SIZE_ATTRIBUTE_ELEMS.indexOf(e.tagName)&&(e.removeAttribute("width"),e.removeAttribute("height"));for(var i=e.firstElementChild;null!==i;)this._cleanStyles(i),i=i.nextElementSibling}},_getLinkDensity:function(e){var t=this._getInnerText(e).length;if(0===t)return 0;var i=0;return this._forEachNode(e.getElementsByTagName("a"),function(e){i+=this._getInnerText(e).length}),i/t},_getClassWeight:function(e){if(!this._flagIsActive(this.FLAG_WEIGHT_CLASSES))return 0;var t=0;return"string"==typeof e.className&&""!==e.className&&(this.REGEXPS.negative.test(e.className)&&(t-=25),this.REGEXPS.positive.test(e.className)&&(t+=25)),"string"==typeof e.id&&""!==e.id&&(this.REGEXPS.negative.test(e.id)&&(t-=25),this.REGEXPS.positive.test(e.id)&&(t+=25)),t},_clean:function(e,t){var i=-1!==["object","embed","iframe"].indexOf(t);this._removeNodes(e.getElementsByTagName(t),function(e){if(i){var t=[].map.call(e.attributes,function(e){return e.value}).join("|");if(this.REGEXPS.videos.test(t))return!1;if(this.REGEXPS.videos.test(e.innerHTML))return!1}return!0})},_hasAncestorTag:function(e,t,i,n){i=i||3,t=t.toUpperCase();for(var a=0;e.parentNode;){if(i>0&&a>i)return!1;if(e.parentNode.tagName===t&&(!n||n(e.parentNode)))return!0;e=e.parentNode,a++}return!1},_getRowAndColumnCount:function(e){for(var t=0,i=0,n=e.getElementsByTagName("tr"),a=0;a<n.length;a++){var r=n[a].getAttribute("rowspan")||0;r&&(r=parseInt(r,10)),t+=r||1;for(var s=0,o=n[a].getElementsByTagName("td"),l=0;l<o.length;l++){var h=o[l].getAttribute("colspan")||0;h&&(h=parseInt(h,10)),s+=h||1}i=Math.max(i,s)}return{rows:t,columns:i}},_markDataTables:function(e){for(var t=e.getElementsByTagName("table"),i=0;i<t.length;i++){var n=t[i];if("presentation"!=n.getAttribute("role"))if("0"!=n.getAttribute("datatable"))if(n.getAttribute("summary"))n._readabilityDataTable=!0;else{var a=n.getElementsByTagName("caption")[0];if(a&&a.childNodes.length>0)n._readabilityDataTable=!0;else{if(["col","colgroup","tfoot","thead","th"].some(function(e){return!!n.getElementsByTagName(e)[0]}))this.log("Data table because found data-y descendant"),n._readabilityDataTable=!0;else if(n.getElementsByTagName("table")[0])n._readabilityDataTable=!1;else{var r=this._getRowAndColumnCount(n);r.rows>=10||r.columns>4?n._readabilityDataTable=!0:n._readabilityDataTable=r.rows*r.columns>10}}}else n._readabilityDataTable=!1;else n._readabilityDataTable=!1}},_cleanConditionally:function(e,t){if(this._flagIsActive(this.FLAG_CLEAN_CONDITIONALLY)){var i="ul"===t||"ol"===t;this._removeNodes(e.getElementsByTagName(t),function(e){if(this._hasAncestorTag(e,"table",-1,function(e){return e._readabilityDataTable}))return!1;var t=this._getClassWeight(e);if(this.log("Cleaning Conditionally",e),t+0<0)return!0;if(this._getCharCount(e,",")<10){for(var n=e.getElementsByTagName("p").length,a=e.getElementsByTagName("img").length,r=e.getElementsByTagName("li").length-100,s=e.getElementsByTagName("input").length,o=0,l=e.getElementsByTagName("embed"),h=0,c=l.length;h<c;h+=1)this.REGEXPS.videos.test(l[h].src)||(o+=1);var d=this._getLinkDensity(e),g=this._getInnerText(e).length;return a>1&&n/a<.5&&!this._hasAncestorTag(e,"figure")||!i&&r>n||s>Math.floor(n/3)||!i&&g<25&&(0===a||a>2)&&!this._hasAncestorTag(e,"figure")||!i&&t<25&&d>.2||t>=25&&d>.5||1===o&&g<75||o>1}return!1})}},_cleanMatchedNodes:function(e,t){for(var i=this._getNextNode(e,!0),n=this._getNextNode(e);n&&n!=i;)n=t.test(n.className+" "+n.id)?this._removeAndGetNext(n):this._getNextNode(n)},_cleanHeaders:function(e){for(var t=1;t<3;t+=1)this._removeNodes(e.getElementsByTagName("h"+t),function(e){return this._getClassWeight(e)<0})},_flagIsActive:function(e){return(this._flags&e)>0},_removeFlag:function(e){this._flags=this._flags&~e},_isProbablyVisible:function(e){return"none"!=e.style.display&&!e.hasAttribute("hidden")},isProbablyReaderable:function(e){var t=this._getAllNodesWithTag(this._doc,["p","pre"]),i=this._getAllNodesWithTag(this._doc,["div > br"]);if(i.length){var n=new Set;[].forEach.call(i,function(e){n.add(e.parentNode)}),t=[].concat.apply(Array.from(n),t)}e||(e=this._isProbablyVisible);var a=0;return this._someNode(t,function(t){if(e&&!e(t))return!1;var i=t.className+" "+t.id;if(this.REGEXPS.unlikelyCandidates.test(i)&&!this.REGEXPS.okMaybeItsACandidate.test(i))return!1;if(t.matches&&t.matches("li p"))return!1;var n=t.textContent.trim().length;return!(n<140)&&(a+=Math.sqrt(n-140))>20})},parse:function(){if(this._maxElemsToParse>0){var e=this._doc.getElementsByTagName("*").length;if(e>this._maxElemsToParse)throw new Error("Aborting parsing document; "+e+" elements found")}this._removeScripts(this._doc),this._prepDocument();var t=this._getArticleMetadata();this._articleTitle=t.title;var i=this._grabArticle();if(!i)return null;if(this.log("Grabbed: "+i.innerHTML),this._postProcessContent(i),!t.excerpt){var n=i.getElementsByTagName("p");n.length>0&&(t.excerpt=n[0].textContent.trim())}var a=i.textContent;return{title:this._articleTitle,byline:t.byline||this._articleByline,dir:this._articleDir,content:i.innerHTML,textContent:a,length:a.length,excerpt:t.excerpt}}};var MD5=function(e){function t(e,t){return e<<t|e>>>32-t}function i(e,t){var i,n,a,r,s;return a=2147483648&e,r=2147483648&t,s=(1073741823&e)+(1073741823&t),(i=1073741824&e)&(n=1073741824&t)?2147483648^s^a^r:i|n?1073741824&s?3221225472^s^a^r:1073741824^s^a^r:s^a^r}function n(e,n,a,r,s,o,l){return i(t(e=i(e,i(i(function(e,t,i){return e&t|~e&i}(n,a,r),s),l)),o),n)}function a(e,n,a,r,s,o,l){return i(t(e=i(e,i(i(function(e,t,i){return e&i|t&~i}(n,a,r),s),l)),o),n)}function r(e,n,a,r,s,o,l){return i(t(e=i(e,i(i(function(e,t,i){return e^t^i}(n,a,r),s),l)),o),n)}function s(e,n,a,r,s,o,l){return i(t(e=i(e,i(i(function(e,t,i){return t^(e|~i)}(n,a,r),s),l)),o),n)}function o(e){var t,i="",n="";for(t=0;t<=3;t++)i+=(n="0"+(e>>>8*t&255).toString(16)).substr(n.length-2,2);return i}var l,h,c,d,g,_,u,m,f,N=Array();for(N=function(e){for(var t,i=e.length,n=i+8,a=16*((n-n%64)/64+1),r=Array(a-1),s=0,o=0;o<i;)s=o%4*8,r[t=(o-o%4)/4]=r[t]|e.charCodeAt(o)<<s,o++;return s=o%4*8,r[t=(o-o%4)/4]=r[t]|128<<s,r[a-2]=i<<3,r[a-1]=i>>>29,r}(e=function(e){e=e.replace(/\r\n/g,"\n");for(var t="",i=0;i<e.length;i++){var n=e.charCodeAt(i);n<128?t+=String.fromCharCode(n):n>127&&n<2048?(t+=String.fromCharCode(n>>6|192),t+=String.fromCharCode(63&n|128)):(t+=String.fromCharCode(n>>12|224),t+=String.fromCharCode(n>>6&63|128),t+=String.fromCharCode(63&n|128))}return t}(e)),_=1732584193,u=4023233417,m=2562383102,f=271733878,l=0;l<N.length;l+=16)h=_,c=u,d=m,g=f,u=s(u=s(u=s(u=s(u=r(u=r(u=r(u=r(u=a(u=a(u=a(u=a(u=n(u=n(u=n(u=n(u,m=n(m,f=n(f,_=n(_,u,m,f,N[l+0],7,3614090360),u,m,N[l+1],12,3905402710),_,u,N[l+2],17,606105819),f,_,N[l+3],22,3250441966),m=n(m,f=n(f,_=n(_,u,m,f,N[l+4],7,4118548399),u,m,N[l+5],12,1200080426),_,u,N[l+6],17,2821735955),f,_,N[l+7],22,4249261313),m=n(m,f=n(f,_=n(_,u,m,f,N[l+8],7,1770035416),u,m,N[l+9],12,2336552879),_,u,N[l+10],17,4294925233),f,_,N[l+11],22,2304563134),m=n(m,f=n(f,_=n(_,u,m,f,N[l+12],7,1804603682),u,m,N[l+13],12,4254626195),_,u,N[l+14],17,2792965006),f,_,N[l+15],22,1236535329),m=a(m,f=a(f,_=a(_,u,m,f,N[l+1],5,4129170786),u,m,N[l+6],9,3225465664),_,u,N[l+11],14,643717713),f,_,N[l+0],20,3921069994),m=a(m,f=a(f,_=a(_,u,m,f,N[l+5],5,3593408605),u,m,N[l+10],9,38016083),_,u,N[l+15],14,3634488961),f,_,N[l+4],20,3889429448),m=a(m,f=a(f,_=a(_,u,m,f,N[l+9],5,568446438),u,m,N[l+14],9,3275163606),_,u,N[l+3],14,4107603335),f,_,N[l+8],20,1163531501),m=a(m,f=a(f,_=a(_,u,m,f,N[l+13],5,2850285829),u,m,N[l+2],9,4243563512),_,u,N[l+7],14,1735328473),f,_,N[l+12],20,2368359562),m=r(m,f=r(f,_=r(_,u,m,f,N[l+5],4,4294588738),u,m,N[l+8],11,2272392833),_,u,N[l+11],16,1839030562),f,_,N[l+14],23,4259657740),m=r(m,f=r(f,_=r(_,u,m,f,N[l+1],4,2763975236),u,m,N[l+4],11,1272893353),_,u,N[l+7],16,4139469664),f,_,N[l+10],23,3200236656),m=r(m,f=r(f,_=r(_,u,m,f,N[l+13],4,681279174),u,m,N[l+0],11,3936430074),_,u,N[l+3],16,3572445317),f,_,N[l+6],23,76029189),m=r(m,f=r(f,_=r(_,u,m,f,N[l+9],4,3654602809),u,m,N[l+12],11,3873151461),_,u,N[l+15],16,530742520),f,_,N[l+2],23,3299628645),m=s(m,f=s(f,_=s(_,u,m,f,N[l+0],6,4096336452),u,m,N[l+7],10,1126891415),_,u,N[l+14],15,2878612391),f,_,N[l+5],21,4237533241),m=s(m,f=s(f,_=s(_,u,m,f,N[l+12],6,1700485571),u,m,N[l+3],10,2399980690),_,u,N[l+10],15,4293915773),f,_,N[l+1],21,2240044497),m=s(m,f=s(f,_=s(_,u,m,f,N[l+8],6,1873313359),u,m,N[l+15],10,4264355552),_,u,N[l+6],15,2734768916),f,_,N[l+13],21,1309151649),m=s(m,f=s(f,_=s(_,u,m,f,N[l+4],6,4149444226),u,m,N[l+11],10,3174756917),_,u,N[l+2],15,718787259),f,_,N[l+9],21,3951481745),_=i(_,h),u=i(u,c),m=i(m,d),f=i(f,g);return(o(_)+o(u)+o(m)+o(f)).toLowerCase()},Hash=function(e){var t=new Readability(e.cloneNode(!0)).parse(),i="";return null!==t&&(i=MD5(t.textContent)),i},Meta=function(e){for(var t={},i=e.getElementsByTagName("meta"),n=0;n<i.length;n++){var a=i[n].getAttribute("property"),r=i[n].getAttribute("name"),s=i[n].getAttribute("content");""!=r&&null!=r?t[r]=s:""!=a&&null!=a&&(t[a]=s)}return t},ObjHash=function(e){var t="";for(var i in e)e.hasOwnProperty(i)&&(t+=i+e[i]);return MD5(t)};exports.Hash=Hash,exports.Meta=Meta,exports.ObjHash=ObjHash;
"use strict";function Readability(e,t){if(t&&t.documentElement)e=t,t=arguments[2];else if(!e||!e.documentElement)throw new Error("First argument to Readability constructor should be a document object.");var i;t=t||{},this._doc=e,this._articleTitle=null,this._articleByline=null,this._articleDir=null,this._attempts=[],this._debug=!!t.debug,this._maxElemsToParse=t.maxElemsToParse||this.DEFAULT_MAX_ELEMS_TO_PARSE,this._nbTopCandidates=t.nbTopCandidates||this.DEFAULT_N_TOP_CANDIDATES,this._charThreshold=t.charThreshold||this.DEFAULT_CHAR_THRESHOLD,this._classesToPreserve=this.CLASSES_TO_PRESERVE.concat(t.classesToPreserve||[]),this._flags=this.FLAG_STRIP_UNLIKELYS|this.FLAG_WEIGHT_CLASSES|this.FLAG_CLEAN_CONDITIONALLY,this._debug?(i=function(e){var t=e.nodeName+" ";if(e.nodeType==e.TEXT_NODE)return t+'("'+e.textContent+'")';var i=e.className&&"."+e.className.replace(/ /g,"."),n="";return e.id?n="(#"+e.id+i+")":i&&(n="("+i+")"),t+n},this.log=function(){if("undefined"!=typeof dump){var e=Array.prototype.map.call(arguments,function(e){return e&&e.nodeName?i(e):e}).join(" ");dump("Reader: (Readability) "+e+"\n")}else if("undefined"!=typeof console){var t=["Reader: (Readability) "].concat(arguments);console.log.apply(console,t)}}):this.log=function(){}}Object.defineProperty(exports,"__esModule",{value:!0}),Readability.prototype={FLAG_STRIP_UNLIKELYS:1,FLAG_WEIGHT_CLASSES:2,FLAG_CLEAN_CONDITIONALLY:4,ELEMENT_NODE:1,TEXT_NODE:3,DEFAULT_MAX_ELEMS_TO_PARSE:0,DEFAULT_N_TOP_CANDIDATES:5,DEFAULT_TAGS_TO_SCORE:"section,h2,h3,h4,h5,h6,p,td,pre".toUpperCase().split(","),DEFAULT_CHAR_THRESHOLD:500,REGEXPS:{unlikelyCandidates:/-ad-|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|foot|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|main|shadow/i,positive:/article|body|content|entry|hentry|h-entry|main|page|pagination|post|text|blog|story/i,negative:/hidden|^hid$| hid$| hid |^hid |banner|combx|comment|com-|contact|foot|footer|footnote|masthead|media|meta|outbrain|promo|related|scroll|share|shoutbox|sidebar|skyscraper|sponsor|shopping|tags|tool|widget/i,extraneous:/print|archive|comment|discuss|e[\-]?mail|share|reply|all|login|sign|single|utility/i,byline:/byline|author|dateline|writtenby|p-author/i,replaceFonts:/<(\/?)font[^>]*>/gi,normalize:/\s{2,}/g,videos:/\/\/(www\.)?(dailymotion|youtube|youtube-nocookie|player\.vimeo)\.com/i,nextLink:/(next|weiter|continue|>([^\|]|$)|»([^\|]|$))/i,prevLink:/(prev|earl|old|new|<|«)/i,whitespace:/^\s*$/,hasContent:/\S$/},DIV_TO_P_ELEMS:["A","BLOCKQUOTE","DL","DIV","IMG","OL","P","PRE","TABLE","UL","SELECT"],ALTER_TO_DIV_EXCEPTIONS:["DIV","ARTICLE","SECTION","P"],PRESENTATIONAL_ATTRIBUTES:["align","background","bgcolor","border","cellpadding","cellspacing","frame","hspace","rules","style","valign","vspace"],DEPRECATED_SIZE_ATTRIBUTE_ELEMS:["TABLE","TH","TD","HR","PRE"],PHRASING_ELEMS:["ABBR","AUDIO","B","BDO","BR","BUTTON","CITE","CODE","DATA","DATALIST","DFN","EM","EMBED","I","IMG","INPUT","KBD","LABEL","MARK","MATH","METER","NOSCRIPT","OBJECT","OUTPUT","PROGRESS","Q","RUBY","SAMP","SCRIPT","SELECT","SMALL","SPAN","STRONG","SUB","SUP","TEXTAREA","TIME","VAR","WBR"],CLASSES_TO_PRESERVE:["page"],_postProcessContent:function(e){this._fixRelativeUris(e),this._cleanClasses(e)},_removeNodes:function(e,t){for(var i=e.length-1;i>=0;i--){var n=e[i],a=n.parentNode;a&&(t&&!t.call(this,n,i,e)||a.removeChild(n))}},_replaceNodeTags:function(e,t){for(var i=e.length-1;i>=0;i--){var n=e[i];this._setNodeTag(n,t)}},_forEachNode:function(e,t){Array.prototype.forEach.call(e,t,this)},_someNode:function(e,t){return Array.prototype.some.call(e,t,this)},_everyNode:function(e,t){return Array.prototype.every.call(e,t,this)},_concatNodeLists:function(){var e=Array.prototype.slice,t=e.call(arguments).map(function(t){return e.call(t)});return Array.prototype.concat.apply([],t)},_getAllNodesWithTag:function(e,t){return e.querySelectorAll?e.querySelectorAll(t.join(",")):[].concat.apply([],t.map(function(t){var i=e.getElementsByTagName(t);return Array.isArray(i)?i:Array.from(i)}))},_cleanClasses:function(e){var t=this._classesToPreserve,i=(e.getAttribute("class")||"").split(/\s+/).filter(function(e){return-1!=t.indexOf(e)}).join(" ");for(i?e.setAttribute("class",i):e.removeAttribute("class"),e=e.firstElementChild;e;e=e.nextElementSibling)this._cleanClasses(e)},_fixRelativeUris:function(e){var t=this._doc.baseURI,i=this._doc.documentURI;function n(e){if(t==i&&"#"==e.charAt(0))return e;try{return new URL(e,t).href}catch(e){}return e}var a=e.getElementsByTagName("a");this._forEachNode(a,function(e){var t=e.getAttribute("href");if(t)if(0===t.indexOf("javascript:")){var i=this._doc.createTextNode(e.textContent);e.parentNode.replaceChild(i,e)}else e.setAttribute("href",n(t))});var r=e.getElementsByTagName("img");this._forEachNode(r,function(e){var t=e.getAttribute("src");t&&e.setAttribute("src",n(t))})},_getArticleTitle:function(){var e=this._doc,t="",i="";try{"string"!=typeof(t=i=e.title.trim())&&(t=i=this._getInnerText(e.getElementsByTagName("title")[0]))}catch(e){}var n=!1;function a(e){return e.split(/\s+/).length}if(/ [\|\-\\\/>»] /.test(t))n=/ [\\\/>»] /.test(t),a(t=i.replace(/(.*)[\|\-\\\/>»] .*/gi,"$1"))<3&&(t=i.replace(/[^\|\-\\\/>»]*[\|\-\\\/>»](.*)/gi,"$1"));else if(-1!==t.indexOf(": ")){var r=this._concatNodeLists(e.getElementsByTagName("h1"),e.getElementsByTagName("h2")),s=t.trim();this._someNode(r,function(e){return e.textContent.trim()===s})||(a(t=i.substring(i.lastIndexOf(":")+1))<3?t=i.substring(i.indexOf(":")+1):a(i.substr(0,i.indexOf(":")))>5&&(t=i))}else if(t.length>150||t.length<15){var o=e.getElementsByTagName("h1");1===o.length&&(t=this._getInnerText(o[0]))}var l=a(t=t.trim());return l<=4&&(!n||l!=a(i.replace(/[\|\-\\\/>»]+/g,""))-1)&&(t=i),t},_prepDocument:function(){var e=this._doc;this._removeNodes(e.getElementsByTagName("style")),e.body&&this._replaceBrs(e.body),this._replaceNodeTags(e.getElementsByTagName("font"),"SPAN")},_nextElement:function(e){for(var t=e;t&&t.nodeType!=this.ELEMENT_NODE&&this.REGEXPS.whitespace.test(t.textContent);)t=t.nextSibling;return t},_replaceBrs:function(e){this._forEachNode(this._getAllNodesWithTag(e,["br"]),function(e){for(var t=e.nextSibling,i=!1;(t=this._nextElement(t))&&"BR"==t.tagName;){i=!0;var n=t.nextSibling;t.parentNode.removeChild(t),t=n}if(i){var a=this._doc.createElement("p");for(e.parentNode.replaceChild(a,e),t=a.nextSibling;t;){if("BR"==t.tagName){var r=this._nextElement(t.nextSibling);if(r&&"BR"==r.tagName)break}if(!this._isPhrasingContent(t))break;var s=t.nextSibling;a.appendChild(t),t=s}for(;a.lastChild&&this._isWhitespace(a.lastChild);)a.removeChild(a.lastChild);"P"===a.parentNode.tagName&&this._setNodeTag(a.parentNode,"DIV")}})},_setNodeTag:function(e,t){if(this.log("_setNodeTag",e,t),e.__JSDOMParser__)return e.localName=t.toLowerCase(),e.tagName=t.toUpperCase(),e;for(var i=e.ownerDocument.createElement(t);e.firstChild;)i.appendChild(e.firstChild);e.parentNode.replaceChild(i,e),e.readability&&(i.readability=e.readability);for(var n=0;n<e.attributes.length;n++)i.setAttribute(e.attributes[n].name,e.attributes[n].value);return i},_prepArticle:function(e){this._cleanStyles(e),this._markDataTables(e),this._cleanConditionally(e,"form"),this._cleanConditionally(e,"fieldset"),this._clean(e,"object"),this._clean(e,"embed"),this._clean(e,"h1"),this._clean(e,"footer"),this._clean(e,"link"),this._clean(e,"aside"),this._forEachNode(e.children,function(e){this._cleanMatchedNodes(e,/share/)});var t=e.getElementsByTagName("h2");if(1===t.length){var i=(t[0].textContent.length-this._articleTitle.length)/this._articleTitle.length;if(Math.abs(i)<.5){(i>0?t[0].textContent.includes(this._articleTitle):this._articleTitle.includes(t[0].textContent))&&this._clean(e,"h2")}}this._clean(e,"iframe"),this._clean(e,"input"),this._clean(e,"textarea"),this._clean(e,"select"),this._clean(e,"button"),this._cleanHeaders(e),this._cleanConditionally(e,"table"),this._cleanConditionally(e,"ul"),this._cleanConditionally(e,"div"),this._removeNodes(e.getElementsByTagName("p"),function(e){return 0===e.getElementsByTagName("img").length+e.getElementsByTagName("embed").length+e.getElementsByTagName("object").length+e.getElementsByTagName("iframe").length&&!this._getInnerText(e,!1)}),this._forEachNode(this._getAllNodesWithTag(e,["br"]),function(e){var t=this._nextElement(e.nextSibling);t&&"P"==t.tagName&&e.parentNode.removeChild(e)}),this._forEachNode(this._getAllNodesWithTag(e,["table"]),function(e){var t=this._hasSingleTagInsideElement(e,"TBODY")?e.firstElementChild:e;if(this._hasSingleTagInsideElement(t,"TR")){var i=t.firstElementChild;if(this._hasSingleTagInsideElement(i,"TD")){var n=i.firstElementChild;n=this._setNodeTag(n,this._everyNode(n.childNodes,this._isPhrasingContent)?"P":"DIV"),e.parentNode.replaceChild(n,e)}}})},_initializeNode:function(e){switch(e.readability={contentScore:0},e.tagName){case"DIV":e.readability.contentScore+=5;break;case"PRE":case"TD":case"BLOCKQUOTE":e.readability.contentScore+=3;break;case"ADDRESS":case"OL":case"UL":case"DL":case"DD":case"DT":case"LI":case"FORM":e.readability.contentScore-=3;break;case"H1":case"H2":case"H3":case"H4":case"H5":case"H6":case"TH":e.readability.contentScore-=5}e.readability.contentScore+=this._getClassWeight(e)},_removeAndGetNext:function(e){var t=this._getNextNode(e,!0);return e.parentNode.removeChild(e),t},_getNextNode:function(e,t){if(!t&&e.firstElementChild)return e.firstElementChild;if(e.nextElementSibling)return e.nextElementSibling;do{e=e.parentNode}while(e&&!e.nextElementSibling);return e&&e.nextElementSibling},_checkByline:function(e,t){if(this._articleByline)return!1;if(void 0!==e.getAttribute)var i=e.getAttribute("rel");return!("author"!==i&&!this.REGEXPS.byline.test(t)||!this._isValidByline(e.textContent))&&(this._articleByline=e.textContent.trim(),!0)},_getNodeAncestors:function(e,t){t=t||0;for(var i=0,n=[];e.parentNode&&(n.push(e.parentNode),!t||++i!==t);)e=e.parentNode;return n},_grabArticle:function(e){this.log("**** grabArticle ****");var t=this._doc,i=null!==e;if(!(e=e||this._doc.body))return this.log("No body found in document. Abort."),null;for(var n=e.innerHTML;;){for(var a=this._flagIsActive(this.FLAG_STRIP_UNLIKELYS),r=[],s=this._doc.documentElement;s;){var o=s.className+" "+s.id;if(this._isProbablyVisible(s))if(this._checkByline(s,o))s=this._removeAndGetNext(s);else if(a&&this.REGEXPS.unlikelyCandidates.test(o)&&!this.REGEXPS.okMaybeItsACandidate.test(o)&&"BODY"!==s.tagName&&"A"!==s.tagName)this.log("Removing unlikely candidate - "+o),s=this._removeAndGetNext(s);else if("DIV"!==s.tagName&&"SECTION"!==s.tagName&&"HEADER"!==s.tagName&&"H1"!==s.tagName&&"H2"!==s.tagName&&"H3"!==s.tagName&&"H4"!==s.tagName&&"H5"!==s.tagName&&"H6"!==s.tagName||!this._isElementWithoutContent(s)){if(-1!==this.DEFAULT_TAGS_TO_SCORE.indexOf(s.tagName)&&r.push(s),"DIV"===s.tagName){for(var l=null,h=s.firstChild;h;){var c=h.nextSibling;if(this._isPhrasingContent(h))null!==l?l.appendChild(h):this._isWhitespace(h)||(l=t.createElement("p"),s.replaceChild(l,h),l.appendChild(h));else if(null!==l){for(;l.lastChild&&this._isWhitespace(l.lastChild);)l.removeChild(l.lastChild);l=null}h=c}if(this._hasSingleTagInsideElement(s,"P")&&this._getLinkDensity(s)<.25){var d=s.children[0];s.parentNode.replaceChild(d,s),s=d,r.push(s)}else this._hasChildBlockElement(s)||(s=this._setNodeTag(s,"P"),r.push(s))}s=this._getNextNode(s)}else s=this._removeAndGetNext(s);else this.log("Removing hidden node - "+o),s=this._removeAndGetNext(s)}var g=[];this._forEachNode(r,function(e){if(e.parentNode&&void 0!==e.parentNode.tagName){var t=this._getInnerText(e);if(!(t.length<25)){var i=this._getNodeAncestors(e,3);if(0!==i.length){var n=0;n+=1,n+=t.split(",").length,n+=Math.min(Math.floor(t.length/100),3),this._forEachNode(i,function(e,t){if(e.tagName&&e.parentNode&&void 0!==e.parentNode.tagName){if(void 0===e.readability&&(this._initializeNode(e),g.push(e)),0===t)var i=1;else i=1===t?2:3*t;e.readability.contentScore+=n/i}})}}}});for(var _=[],u=0,m=g.length;u<m;u+=1){var f=g[u],N=f.readability.contentScore*(1-this._getLinkDensity(f));f.readability.contentScore=N,this.log("Candidate:",f,"with score "+N);for(var E=0;E<this._nbTopCandidates;E++){var p=_[E];if(!p||N>p.readability.contentScore){_.splice(E,0,f),_.length>this._nbTopCandidates&&_.pop();break}}}var T,b=_[0]||null,v=!1;if(null===b||"BODY"===b.tagName){b=t.createElement("DIV"),v=!0;for(var y=e.childNodes;y.length;)this.log("Moving child out:",y[0]),b.appendChild(y[0]);e.appendChild(b),this._initializeNode(b)}else if(b){for(var A=[],C=1;C<_.length;C++)_[C].readability.contentScore/b.readability.contentScore>=.75&&A.push(this._getNodeAncestors(_[C]));if(A.length>=3)for(T=b.parentNode;"BODY"!==T.tagName;){for(var S=0,L=0;L<A.length&&S<3;L++)S+=Number(A[L].includes(T));if(S>=3){b=T;break}T=T.parentNode}b.readability||this._initializeNode(b),T=b.parentNode;for(var x=b.readability.contentScore,I=x/3;"BODY"!==T.tagName;)if(T.readability){var D=T.readability.contentScore;if(D<I)break;if(D>x){b=T;break}x=T.readability.contentScore,T=T.parentNode}else T=T.parentNode;for(T=b.parentNode;"BODY"!=T.tagName&&1==T.children.length;)T=(b=T).parentNode;b.readability||this._initializeNode(b)}var R=t.createElement("DIV");i&&(R.id="readability-content");for(var B=Math.max(10,.2*b.readability.contentScore),O=(T=b.parentNode).children,P=0,M=O.length;P<M;P++){var G=O[P],H=!1;if(this.log("Looking at sibling node:",G,G.readability?"with score "+G.readability.contentScore:""),this.log("Sibling has score",G.readability?G.readability.contentScore:"Unknown"),G===b)H=!0;else{var w=0;if(G.className===b.className&&""!==b.className&&(w+=.2*b.readability.contentScore),G.readability&&G.readability.contentScore+w>=B)H=!0;else if("P"===G.nodeName){var k=this._getLinkDensity(G),U=this._getInnerText(G),F=U.length;F>80&&k<.25?H=!0:F<80&&F>0&&0===k&&-1!==U.search(/\.( |$)/)&&(H=!0)}}H&&(this.log("Appending node:",G),-1===this.ALTER_TO_DIV_EXCEPTIONS.indexOf(G.nodeName)&&(this.log("Altering sibling:",G,"to div."),G=this._setNodeTag(G,"DIV")),R.appendChild(G),P-=1,M-=1)}if(this._debug&&this.log("Article content pre-prep: "+R.innerHTML),this._prepArticle(R),this._debug&&this.log("Article content post-prep: "+R.innerHTML),v)b.id="readability-page-1",b.className="page";else{var X=t.createElement("DIV");X.id="readability-page-1",X.className="page";for(var V=R.childNodes;V.length;)X.appendChild(V[0]);R.appendChild(X)}this._debug&&this.log("Article content after paging: "+R.innerHTML);var W=!0,Y=this._getInnerText(R,!0).length;if(Y<this._charThreshold)if(W=!1,e.innerHTML=n,this._flagIsActive(this.FLAG_STRIP_UNLIKELYS))this._removeFlag(this.FLAG_STRIP_UNLIKELYS),this._attempts.push({articleContent:R,textLength:Y});else if(this._flagIsActive(this.FLAG_WEIGHT_CLASSES))this._removeFlag(this.FLAG_WEIGHT_CLASSES),this._attempts.push({articleContent:R,textLength:Y});else if(this._flagIsActive(this.FLAG_CLEAN_CONDITIONALLY))this._removeFlag(this.FLAG_CLEAN_CONDITIONALLY),this._attempts.push({articleContent:R,textLength:Y});else{if(this._attempts.push({articleContent:R,textLength:Y}),this._attempts.sort(function(e,t){return e.textLength<t.textLength}),!this._attempts[0].textLength)return null;R=this._attempts[0].articleContent,W=!0}if(W){var j=[T,b].concat(this._getNodeAncestors(T));return this._someNode(j,function(e){if(!e.tagName)return!1;var t=e.getAttribute("dir");return!!t&&(this._articleDir=t,!0)}),R}}},_isValidByline:function(e){return("string"==typeof e||e instanceof String)&&((e=e.trim()).length>0&&e.length<100)},_getArticleMetadata:function(){var e={},t={},i=this._doc.getElementsByTagName("meta"),n=/^\s*((twitter)\s*:\s*)?(description|title)\s*$/gi,a=/^\s*og\s*:\s*(description|title)\s*$/gi;return this._forEachNode(i,function(i){var r=i.getAttribute("name"),s=i.getAttribute("property");if(-1===[r,s].indexOf("author")){var o=null;if(n.test(r)?o=r:a.test(s)&&(o=s),o){var l=i.getAttribute("content");l&&(o=o.toLowerCase().replace(/\s/g,""),t[o]=l.trim())}}else e.byline=i.getAttribute("content")}),"description"in t?e.excerpt=t.description:"og:description"in t?e.excerpt=t["og:description"]:"twitter:description"in t&&(e.excerpt=t["twitter:description"]),e.title=this._getArticleTitle(),e.title||("og:title"in t?e.title=t["og:title"]:"twitter:title"in t&&(e.title=t["twitter:title"])),e},_removeScripts:function(e){this._removeNodes(e.getElementsByTagName("script"),function(e){return e.nodeValue="",e.removeAttribute("src"),!0}),this._removeNodes(e.getElementsByTagName("noscript"))},_hasSingleTagInsideElement:function(e,t){return 1==e.children.length&&e.children[0].tagName===t&&!this._someNode(e.childNodes,function(e){return e.nodeType===this.TEXT_NODE&&this.REGEXPS.hasContent.test(e.textContent)})},_isElementWithoutContent:function(e){return e.nodeType===this.ELEMENT_NODE&&0==e.textContent.trim().length&&(0==e.children.length||e.children.length==e.getElementsByTagName("br").length+e.getElementsByTagName("hr").length)},_hasChildBlockElement:function(e){return this._someNode(e.childNodes,function(e){return-1!==this.DIV_TO_P_ELEMS.indexOf(e.tagName)||this._hasChildBlockElement(e)})},_isPhrasingContent:function(e){return e.nodeType===this.TEXT_NODE||-1!==this.PHRASING_ELEMS.indexOf(e.tagName)||("A"===e.tagName||"DEL"===e.tagName||"INS"===e.tagName)&&this._everyNode(e.childNodes,this._isPhrasingContent)},_isWhitespace:function(e){return e.nodeType===this.TEXT_NODE&&0===e.textContent.trim().length||e.nodeType===this.ELEMENT_NODE&&"BR"===e.tagName},_getInnerText:function(e,t){t=void 0===t||t;var i=e.textContent.trim();return t?i.replace(this.REGEXPS.normalize," "):i},_getCharCount:function(e,t){return t=t||",",this._getInnerText(e).split(t).length-1},_cleanStyles:function(e){if(e&&"svg"!==e.tagName.toLowerCase()){for(var t=0;t<this.PRESENTATIONAL_ATTRIBUTES.length;t++)e.removeAttribute(this.PRESENTATIONAL_ATTRIBUTES[t]);-1!==this.DEPRECATED_SIZE_ATTRIBUTE_ELEMS.indexOf(e.tagName)&&(e.removeAttribute("width"),e.removeAttribute("height"));for(var i=e.firstElementChild;null!==i;)this._cleanStyles(i),i=i.nextElementSibling}},_getLinkDensity:function(e){var t=this._getInnerText(e).length;if(0===t)return 0;var i=0;return this._forEachNode(e.getElementsByTagName("a"),function(e){i+=this._getInnerText(e).length}),i/t},_getClassWeight:function(e){if(!this._flagIsActive(this.FLAG_WEIGHT_CLASSES))return 0;var t=0;return"string"==typeof e.className&&""!==e.className&&(this.REGEXPS.negative.test(e.className)&&(t-=25),this.REGEXPS.positive.test(e.className)&&(t+=25)),"string"==typeof e.id&&""!==e.id&&(this.REGEXPS.negative.test(e.id)&&(t-=25),this.REGEXPS.positive.test(e.id)&&(t+=25)),t},_clean:function(e,t){var i=-1!==["object","embed","iframe"].indexOf(t);this._removeNodes(e.getElementsByTagName(t),function(e){if(i){var t=[].map.call(e.attributes,function(e){return e.value}).join("|");if(this.REGEXPS.videos.test(t))return!1;if(this.REGEXPS.videos.test(e.innerHTML))return!1}return!0})},_hasAncestorTag:function(e,t,i,n){i=i||3,t=t.toUpperCase();for(var a=0;e.parentNode;){if(i>0&&a>i)return!1;if(e.parentNode.tagName===t&&(!n||n(e.parentNode)))return!0;e=e.parentNode,a++}return!1},_getRowAndColumnCount:function(e){for(var t=0,i=0,n=e.getElementsByTagName("tr"),a=0;a<n.length;a++){var r=n[a].getAttribute("rowspan")||0;r&&(r=parseInt(r,10)),t+=r||1;for(var s=0,o=n[a].getElementsByTagName("td"),l=0;l<o.length;l++){var h=o[l].getAttribute("colspan")||0;h&&(h=parseInt(h,10)),s+=h||1}i=Math.max(i,s)}return{rows:t,columns:i}},_markDataTables:function(e){for(var t=e.getElementsByTagName("table"),i=0;i<t.length;i++){var n=t[i];if("presentation"!=n.getAttribute("role"))if("0"!=n.getAttribute("datatable"))if(n.getAttribute("summary"))n._readabilityDataTable=!0;else{var a=n.getElementsByTagName("caption")[0];if(a&&a.childNodes.length>0)n._readabilityDataTable=!0;else{if(["col","colgroup","tfoot","thead","th"].some(function(e){return!!n.getElementsByTagName(e)[0]}))this.log("Data table because found data-y descendant"),n._readabilityDataTable=!0;else if(n.getElementsByTagName("table")[0])n._readabilityDataTable=!1;else{var r=this._getRowAndColumnCount(n);r.rows>=10||r.columns>4?n._readabilityDataTable=!0:n._readabilityDataTable=r.rows*r.columns>10}}}else n._readabilityDataTable=!1;else n._readabilityDataTable=!1}},_cleanConditionally:function(e,t){if(this._flagIsActive(this.FLAG_CLEAN_CONDITIONALLY)){var i="ul"===t||"ol"===t;this._removeNodes(e.getElementsByTagName(t),function(e){if(this._hasAncestorTag(e,"table",-1,function(e){return e._readabilityDataTable}))return!1;var t=this._getClassWeight(e);if(this.log("Cleaning Conditionally",e),t+0<0)return!0;if(this._getCharCount(e,",")<10){for(var n=e.getElementsByTagName("p").length,a=e.getElementsByTagName("img").length,r=e.getElementsByTagName("li").length-100,s=e.getElementsByTagName("input").length,o=0,l=e.getElementsByTagName("embed"),h=0,c=l.length;h<c;h+=1)this.REGEXPS.videos.test(l[h].src)||(o+=1);var d=this._getLinkDensity(e),g=this._getInnerText(e).length;return a>1&&n/a<.5&&!this._hasAncestorTag(e,"figure")||!i&&r>n||s>Math.floor(n/3)||!i&&g<25&&(0===a||a>2)&&!this._hasAncestorTag(e,"figure")||!i&&t<25&&d>.2||t>=25&&d>.5||1===o&&g<75||o>1}return!1})}},_cleanMatchedNodes:function(e,t){for(var i=this._getNextNode(e,!0),n=this._getNextNode(e);n&&n!=i;)n=t.test(n.className+" "+n.id)?this._removeAndGetNext(n):this._getNextNode(n)},_cleanHeaders:function(e){for(var t=1;t<3;t+=1)this._removeNodes(e.getElementsByTagName("h"+t),function(e){return this._getClassWeight(e)<0})},_flagIsActive:function(e){return(this._flags&e)>0},_removeFlag:function(e){this._flags=this._flags&~e},_isProbablyVisible:function(e){return"none"!=e.style.display&&!e.hasAttribute("hidden")},isProbablyReaderable:function(e){var t=this._getAllNodesWithTag(this._doc,["p","pre"]),i=this._getAllNodesWithTag(this._doc,["div > br"]);if(i.length){var n=new Set;[].forEach.call(i,function(e){n.add(e.parentNode)}),t=[].concat.apply(Array.from(n),t)}e||(e=this._isProbablyVisible);var a=0;return this._someNode(t,function(t){if(e&&!e(t))return!1;var i=t.className+" "+t.id;if(this.REGEXPS.unlikelyCandidates.test(i)&&!this.REGEXPS.okMaybeItsACandidate.test(i))return!1;if(t.matches&&t.matches("li p"))return!1;var n=t.textContent.trim().length;return!(n<140)&&(a+=Math.sqrt(n-140))>20})},parse:function(){if(this._maxElemsToParse>0){var e=this._doc.getElementsByTagName("*").length;if(e>this._maxElemsToParse)throw new Error("Aborting parsing document; "+e+" elements found")}this._removeScripts(this._doc),this._prepDocument();var t=this._getArticleMetadata();this._articleTitle=t.title;var i=this._grabArticle();if(!i)return null;if(this.log("Grabbed: "+i.innerHTML),this._postProcessContent(i),!t.excerpt){var n=i.getElementsByTagName("p");n.length>0&&(t.excerpt=n[0].textContent.trim())}var a=i.textContent;return{title:this._articleTitle,byline:t.byline||this._articleByline,dir:this._articleDir,content:i.innerHTML,textContent:a,length:a.length,excerpt:t.excerpt}}};var MD5=function(e){function t(e,t){return e<<t|e>>>32-t}function i(e,t){var i,n,a,r,s;return a=2147483648&e,r=2147483648&t,s=(1073741823&e)+(1073741823&t),(i=1073741824&e)&(n=1073741824&t)?2147483648^s^a^r:i|n?1073741824&s?3221225472^s^a^r:1073741824^s^a^r:s^a^r}function n(e,n,a,r,s,o,l){return i(t(e=i(e,i(i(function(e,t,i){return e&t|~e&i}(n,a,r),s),l)),o),n)}function a(e,n,a,r,s,o,l){return i(t(e=i(e,i(i(function(e,t,i){return e&i|t&~i}(n,a,r),s),l)),o),n)}function r(e,n,a,r,s,o,l){return i(t(e=i(e,i(i(function(e,t,i){return e^t^i}(n,a,r),s),l)),o),n)}function s(e,n,a,r,s,o,l){return i(t(e=i(e,i(i(function(e,t,i){return t^(e|~i)}(n,a,r),s),l)),o),n)}function o(e){var t,i="",n="";for(t=0;t<=3;t++)i+=(n="0"+(e>>>8*t&255).toString(16)).substr(n.length-2,2);return i}var l,h,c,d,g,_,u,m,f,N=Array();for(N=function(e){for(var t,i=e.length,n=i+8,a=16*((n-n%64)/64+1),r=Array(a-1),s=0,o=0;o<i;)s=o%4*8,r[t=(o-o%4)/4]=r[t]|e.charCodeAt(o)<<s,o++;return s=o%4*8,r[t=(o-o%4)/4]=r[t]|128<<s,r[a-2]=i<<3,r[a-1]=i>>>29,r}(e=function(e){e=e.replace(/\r\n/g,"\n");for(var t="",i=0;i<e.length;i++){var n=e.charCodeAt(i);n<128?t+=String.fromCharCode(n):n>127&&n<2048?(t+=String.fromCharCode(n>>6|192),t+=String.fromCharCode(63&n|128)):(t+=String.fromCharCode(n>>12|224),t+=String.fromCharCode(n>>6&63|128),t+=String.fromCharCode(63&n|128))}return t}(e)),_=1732584193,u=4023233417,m=2562383102,f=271733878,l=0;l<N.length;l+=16)h=_,c=u,d=m,g=f,u=s(u=s(u=s(u=s(u=r(u=r(u=r(u=r(u=a(u=a(u=a(u=a(u=n(u=n(u=n(u=n(u,m=n(m,f=n(f,_=n(_,u,m,f,N[l+0],7,3614090360),u,m,N[l+1],12,3905402710),_,u,N[l+2],17,606105819),f,_,N[l+3],22,3250441966),m=n(m,f=n(f,_=n(_,u,m,f,N[l+4],7,4118548399),u,m,N[l+5],12,1200080426),_,u,N[l+6],17,2821735955),f,_,N[l+7],22,4249261313),m=n(m,f=n(f,_=n(_,u,m,f,N[l+8],7,1770035416),u,m,N[l+9],12,2336552879),_,u,N[l+10],17,4294925233),f,_,N[l+11],22,2304563134),m=n(m,f=n(f,_=n(_,u,m,f,N[l+12],7,1804603682),u,m,N[l+13],12,4254626195),_,u,N[l+14],17,2792965006),f,_,N[l+15],22,1236535329),m=a(m,f=a(f,_=a(_,u,m,f,N[l+1],5,4129170786),u,m,N[l+6],9,3225465664),_,u,N[l+11],14,643717713),f,_,N[l+0],20,3921069994),m=a(m,f=a(f,_=a(_,u,m,f,N[l+5],5,3593408605),u,m,N[l+10],9,38016083),_,u,N[l+15],14,3634488961),f,_,N[l+4],20,3889429448),m=a(m,f=a(f,_=a(_,u,m,f,N[l+9],5,568446438),u,m,N[l+14],9,3275163606),_,u,N[l+3],14,4107603335),f,_,N[l+8],20,1163531501),m=a(m,f=a(f,_=a(_,u,m,f,N[l+13],5,2850285829),u,m,N[l+2],9,4243563512),_,u,N[l+7],14,1735328473),f,_,N[l+12],20,2368359562),m=r(m,f=r(f,_=r(_,u,m,f,N[l+5],4,4294588738),u,m,N[l+8],11,2272392833),_,u,N[l+11],16,1839030562),f,_,N[l+14],23,4259657740),m=r(m,f=r(f,_=r(_,u,m,f,N[l+1],4,2763975236),u,m,N[l+4],11,1272893353),_,u,N[l+7],16,4139469664),f,_,N[l+10],23,3200236656),m=r(m,f=r(f,_=r(_,u,m,f,N[l+13],4,681279174),u,m,N[l+0],11,3936430074),_,u,N[l+3],16,3572445317),f,_,N[l+6],23,76029189),m=r(m,f=r(f,_=r(_,u,m,f,N[l+9],4,3654602809),u,m,N[l+12],11,3873151461),_,u,N[l+15],16,530742520),f,_,N[l+2],23,3299628645),m=s(m,f=s(f,_=s(_,u,m,f,N[l+0],6,4096336452),u,m,N[l+7],10,1126891415),_,u,N[l+14],15,2878612391),f,_,N[l+5],21,4237533241),m=s(m,f=s(f,_=s(_,u,m,f,N[l+12],6,1700485571),u,m,N[l+3],10,2399980690),_,u,N[l+10],15,4293915773),f,_,N[l+1],21,2240044497),m=s(m,f=s(f,_=s(_,u,m,f,N[l+8],6,1873313359),u,m,N[l+15],10,4264355552),_,u,N[l+6],15,2734768916),f,_,N[l+13],21,1309151649),m=s(m,f=s(f,_=s(_,u,m,f,N[l+4],6,4149444226),u,m,N[l+11],10,3174756917),_,u,N[l+2],15,718787259),f,_,N[l+9],21,3951481745),_=i(_,h),u=i(u,c),m=i(m,d),f=i(f,g);return(o(_)+o(u)+o(m)+o(f)).toLowerCase()},Readable=function(e){return new Readability(e.cloneNode(!0)).parse()},Hash=function(e,t){var i=e.cloneNode(!0);"function"==typeof t&&t(i);var n=new Readability(i).parse(),a="";return null!==n&&(a=MD5(n.textContent)),a},Meta=function(e){for(var t={},i=e.getElementsByTagName("meta"),n=0;n<i.length;n++){var a=i[n].getAttribute("property"),r=i[n].getAttribute("name"),s=i[n].getAttribute("content");""!=r&&null!=r?t[r]=s:""!=a&&null!=a&&(t[a]=s)}return t},ObjHash=function(e){var t="";for(var i in e)e.hasOwnProperty(i)&&(t+=i+e[i]);return MD5(t)};exports.Readable=Readable,exports.Hash=Hash,exports.Meta=Meta,exports.ObjHash=ObjHash;
//# sourceMappingURL=main.js.map
{
"name": "readability-hash",
"description": "Content hashing for de-duplication",
"version": "1.1.3",
"version": "1.1.4",
"author": {

@@ -6,0 +6,0 @@ "name": "Sajari Support <support@sajari.com>",

@@ -8,3 +8,4 @@ import { Readability } from "./utils/readability";

var documentClone = document.cloneNode(true);
return new Readability(documentClone).parse();
var r = new Readability(documentClone).parse();
return r;
};

@@ -17,3 +18,3 @@

// on the cloned document
var Hash = function (document, filterFn) {
var Hash = function(document, filterFn) {
var documentClone = document.cloneNode(true);

@@ -33,18 +34,18 @@ if (typeof filterFn === 'function') {

// and returns an object with key-val pairs.
var Meta = function (document) {
var Meta = function(document) {
var out = {};
var metas = document.getElementsByTagName('meta');
var metas = document.getElementsByTagName('meta');
for (var i=0; i<metas.length; i++) {
var prop = metas[i].getAttribute("property");
var name = metas[i].getAttribute("name");
var content = metas[i].getAttribute("content");
if (name != "" && name != null) {
out[name] = content;
} else if (prop != "" && prop != null) {
out[prop] = content;
}
}
for (var i=0; i<metas.length; i++) {
var prop = metas[i].getAttribute("property");
var name = metas[i].getAttribute("name");
var content = metas[i].getAttribute("content");
if (name != "" && name != null) {
out[name] = content;
} else if (prop != "" && prop != null) {
out[prop] = content;
}
}
return out;
return out;
};

@@ -51,0 +52,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc