fuzzystringmatch
Version:
a small library that creates a in-memory index for a fast and fuzzy lookup of search terms
35 lines (27 loc) • 684 B
JavaScript
"use strict"
var prepareTerm = require('./tools/prepareTerm')
var identBuilder = require('./tools/identBuilder')
class Subject {
constructor (term) {
this._term = term
this._termPrepared = prepareTerm(term)
this._termPreparedIdent = identBuilder(term)
this._chunks = []
}
getTerm () {
return this._term
}
getTermPrepared () {
return this._termPrepared
}
getTermPreparedIdent () {
return this._termPreparedIdent
}
addChunk (chunk) {
this._chunks.push(chunk)
}
getChunks () {
return this._chunks
}
}
module.exports = Subject