UNPKG

gitdocs

Version:

Easy to use, SEO-friendly, beautiful documentation that lives in your git repo.

12 lines (10 loc) 271 B
import { Search as JsSearch } from 'js-search' // Create search instance for indexed doc search export function createDB ({ ref, indices, items }) { const db = new JsSearch('url') indices.forEach(i => { db.addIndex(i) }) db.addDocuments(items) return db }