function PassjoinIndex(levenshtein, k) {
  if (typeof levenshtein !== 'function')
    throw new Error('mnemonist/passjoin-index: `levenshtein` should be a function returning edit distance between two strings.');

  if (typeof k !== 'number' || k < 1)
    throw new Error('mnemonist/passjoin-index: `k` should be a number > 0');

  this.levenshtein = levenshtein;
  this.k = k;
  this.clear();
}
PassjoinIndex.

@note I tried to apply the paper's optimizations regarding Levenshtein
distance computations but it did not provide a performance boost, quite
the contrary. This is because since we are mostly using the index for small k
here, most of the strings we work on are quite small and the bookkeeping
induced by Ukkonen's method and the paper's one are slowing us down more than
they actually help us go faster.

@note This implementation does not try to ensure that you add the same string
more than once.

@constructor
@param {function} levenshtein - Levenshtein distance function.
@param {number}   k           - Levenshtein distance threshold.