Skip to content

Latest commit

 

History

History
22 lines (16 loc) · 1.15 KB

README.md

File metadata and controls

22 lines (16 loc) · 1.15 KB

search-engine

Actions Status Node CI Maintainability Test Coverage

About

Search Engine that helps find the information by searched value

Example

const doc1 = { id: 'doc1', text: "I can't shoot straight unless I've had a pint!" };
const doc2 = { id: 'doc2', text: "Don't shoot shoot shoot that thing at me." };
const doc3 = { id: 'doc3', text: "I'm your shooter." };
const docs = [doc1, doc2, doc3];

const searchEngine = buildSearchEngine(docs);
console.log(searchEngine.search('shoot at me')); // ['doc2', 'doc1']