fallout4-bobbleheads
Version:
Get fallout4 bobblehead locations and descriptions.
18 lines (15 loc) • 428 B
JavaScript
const bobbleheads = require('./bobbleheads.json')
const _ = require('lodash')
function search(searchWords) {
let foundItems = _.filter(bobbleheads, function(bobblehead){
return _.some(_.values(bobblehead), function(value){
return _.toLower(value).indexOf(_.toLower(searchWords))!== -1
})
})
return foundItems
}
module.exports = {
all: bobbleheads,
search: search
}