For example, an index with "constructor" or "UNDERUNDERprotoUNDERUNDER" terms in it will cause idf() to return the Object.prototype property of the same name.
(UNDER is _. Used here to avoid GFM stripping the _s and turning the property bold)
Because the returned property of Object.prototype is not a number, the subsequent calculations return NaN.
For example, an index with "constructor" or "UNDERUNDERprotoUNDERUNDER" terms in it will cause
idf()
to return theObject.prototype
property of the same name.(UNDER is
_
. Used here to avoid GFM stripping the_
s and turning the property bold)Because the returned property of
Object.prototype
is not a number, the subsequent calculations returnNaN
.Pull request with tests to follow.