UNPKG

unified-query

Version:

Composable search input with autocompletion and a rich query-language parser for the Unified Data System

13 lines (12 loc) 365 B
import { timestampAnalyzer } from './timestamp.js'; export function analyzeDone(seg) { const { parsed, errors } = timestampAnalyzer(seg, { allowBoolean: true }); seg.errors.push(...errors); return { keyword: 'done', parsed, // boolean | timestamps[] | undefined from: seg.from, to: seg.to, raw: seg.raw, }; }