Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
score(fnode => {
const paragraphishNote = fnode.noteFor('paragraphish')
return paragraphishNote
? (1 - linkDensity(fnode, paragraphishNote.inlineLength)) * 1.5
: (1 - linkDensity(fnode)) * 1.5
}),
),
score(fnode => {
const paragraphishNote = fnode.noteFor('paragraphish')
return paragraphishNote
? (1 - linkDensity(fnode, paragraphishNote.inlineLength)) * 1.5
: (1 - linkDensity(fnode)) * 1.5
}),
),
function byInverseLinkDensity(fnode) {
const linkDensity = Futils.linkDensity(fnode,
fnode.noteFor('paragraphish').length);
if (Number.isNaN(linkDensity))
return 1;
return (1 - linkDensity) * 1.5;
}
function byInverseLinkDensity(fnode) {
const linkDensity = Futils.linkDensity(fnode,
fnode.noteFor('paragraphish').length);
if (Number.isNaN(linkDensity))
return 1;
return (1 - linkDensity) * 1.5;
}