IF Commons GitHub

logical/functions

Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0002-query-language FR-005

The scalar functions of the language that are not the language library's (commons anyfs-query 0002-query-language FR-005): under, contains and json_get, each total (a value that is not known gives no value) and bounded, so that no text a query is given makes one run long.

Source: commons/anyfs-query/src/logical/functions.ts

2 of 7 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.

MAX_JSON_BYTESconstno test imports it
const MAX_JSON_BYTES: number

The most text json_get reads.

MAX_JSON_DEPTHconstno test imports it
const MAX_JSON_DEPTH: 64

The deepest nesting json_get reads.

MAX_JSON_PATHconstno test imports it
const MAX_JSON_PATH: 256

The longest path json_get follows.

underfunction
function under(path: string, prefix: string): boolean

Whether a path is a path or below the prefix, by whole segments: a/b is under a, and ab is not.

Imported by 7 tests of the run (7 passed, 0 failed): the library's results

stepsOffunctionno test imports it
function stepsOf(path: string): readonly Step[] | undefined

The steps of a path such as $.a.b[0].c, or nothing where it is not one.

jsonGetfunction
function jsonGet(text: string, path: string): Value

The value at a path of a JSON text: a scalar as itself, an object or array as its text, and nothing where there is none or the text is too long, too deep or not JSON.

Imported by 7 tests of the run (7 passed, 0 failed): the library's results

environmentFunctionsfunctionno test imports it
function environmentFunctions(nowSeconds: number): ReadonlyMap<string, Fn>

The functions of an environment: those of the language library and the three of this one, and now as the time given.

Titles, headings, exports, tables, columns and requirements. Esc closes.