Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | /**
* **Safe functions** — a serializable vocabulary of conditions and values, and
* the compiler that turns it into executable predicates without `eval`.
*
* The vocabulary knows nothing about display sets, hanging protocols or DICOM
* keywords. It describes tests and values over a subject object, so any
* feature that currently ships hand-written matching code can be expressed as
* data instead and shared across the wire. The value helpers (`values.ts`) use
* the DICOM meaning of a missing value: absent is `undefined`, and empty is
* `null`, `''` or `[]`.
*
* The allowed forms and keys are one table, the schema in `schema.ts`, which
* the compiler reads. A consumer that wraps conditions and values in a shape of
* its own extends that table, and gives the reader of a name (`readName`).
*
* Display-set split rules are the worked example: see
* `displayset/compileSplitRules.ts`, which wraps these conditions and values
* in a rule shape of its own (`matches`, `groupBy`, `sortBy`, `attributes`,
* ...), and `displayset/displaySetContext.ts`, which gives the names.
*/
export {
compileCondition,
compileConditionAt,
compileExpressionAt,
compileTemplate,
compileValue,
compileValueAt,
createSite,
hasNoValue,
invalid,
isAbsent,
isEmpty,
isTrue,
compareFinite,
looseEquals,
parseTemplate,
readNameAt,
readOwnName,
safeFunctionCompilers,
type CompileOptions,
type TemplateSegment,
} from './compile';
export {
compileMatchTest,
MATCH_HELPERS,
MATCH_OPERATORS,
type ValueTest,
} from './matchTests';
export {
at,
checkForm,
compileKey,
conditionShape,
describeForm,
describeShape,
didYouMean,
INSTANCE_EXPRESSION_SCOPE,
invalidAt,
isLeafKind,
isUnsafeKey,
MATCH_OPERATOR_NAMES,
matchForm,
matchTestShape,
hasOwn,
readOwn,
RuleCompileError,
safeFunctionSchema,
selectForm,
unrecognized,
valueShape,
type ExpressionScope,
type NameReader,
type NameReaderFunction,
type Schema,
type SchemaForm,
type SchemaKey,
type SchemaLeafKind,
type SchemaShape,
type SchemaSite,
type ShapeCompiler,
} from './schema';
export {
collectIdentifiers,
collectReads,
compileExpression,
ExpressionSyntaxError,
parseExpressionSource,
tokenize,
FORBIDDEN_PROPERTIES,
type CompiledExpression,
type CompileExpressionOptions,
type ExpressionNode,
type ExpressionRead,
} from './expression';
export type {
CompiledPredicate,
CompiledValue,
InlinePredicate,
InlineValue,
RawCondition,
RawMatchTest,
RawScalar,
RawValue,
SafeFunctionSubject,
} from './types';
|