UNPKG

retrieval

Version:

Full text search engine in js. Features BM25 ranking function that can be tuned.

11 lines (9 loc) 337 B
/** * Create an array based on the length & initial value passed in. * @exports {Function} that takes a length parameter as well as the value with * which you want to fill the array, and it creates such an array. */ const _ = require('lodash'); module.exports = function(len_, value_=0) { return _.fill(Array(len_), value_); };