UNPKG

datum-focus

Version:

Data shape, model, metadata, JSON, JSON Schema, GraphQL, MongoDB query and aggregations, iterator generators

19 lines (13 loc) 540 B
/** Custom Aggregation Expression Operators */ /** Defines a custom accumulator function. */ export const $accumulator = "$accumulator"; /** Defines a custom function. */ export const $function = "$function"; const CUSTOM_AGGREGATION_OPERATORS = [ $accumulator, $function ] as const; export type CustomAggregationExpressionOperator = typeof CUSTOM_AGGREGATION_OPERATORS[number]; export const isCustomAggregationExpressionOperator = ( val: any ): val is CustomAggregationExpressionOperator => val in CUSTOM_AGGREGATION_OPERATORS;