UNPKG

retrieval

Version:

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

11 lines (10 loc) 300 B
/** * Cast all strings to ints in an array. * @exports {Function} that takes a string array and then casts * all its entries to integers (base 10) using the parseInt function. */ module.exports = function(arr_) { return arr_.map(function(elem) { return parseInt(elem, 10); }); };