UNPKG

unified-query

Version:

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

13 lines (12 loc) 375 B
import { timestampAnalyzer } from './timestamp.js'; export function analyzeCreated(seg) { const { parsed, errors } = timestampAnalyzer(seg, { allowBoolean: false }); seg.errors.push(...errors); return { keyword: 'created', parsed: parsed, // ensured by allowBoolean=false from: seg.from, to: seg.to, raw: seg.raw, }; }