• Home
  • Raw
  • Download

Lines Matching +full:helper +full:- +full:function +full:- +full:name

7 //      http://www.apache.org/licenses/LICENSE-2.0
21 // This file implements a component for rendering JSON-like values (with
26 // and `renderValue` function to convert DictValue into vdom nodes.
28 // Leaf (non-dict and non-array) value which can be displayed to the user
35 // Helper function to create a StringValue from string together with optional
37 export function value(value: string, params?: StringValueParams): StringValue {
45 // Helper function to convert a potentially undefined value to StringValue or
47 export function maybeValue(
57 // A basic type for the JSON-like value, comprising a primitive type (string)
64 items: {[name: string]: Value};
67 // Helper function to simplify creation of a dictionary.
68 // This function accepts and filters out nulls as values in the passed
70 export function dict(
71 items: {[name: string]: Value | null},
74 const result: {[name: string]: Value} = {};
75 for (const [name, value] of Object.entries(items)) { constant
77 result[name] = value;
93 // Helper function to simplify creation of an array.
94 // This function accepts and filters out nulls in the passed array (useful for
96 export function array(items: (Value | null)[], params?: ValueParams): Array {
105 // the context-dependent action (i.e. go to the corresponding slice).
124 export function isArray(value: Value): value is Array {
128 export function isDict(value: Value): value is Dict {
132 export function isStringValue(value: Value): value is StringValue {
138 function renderValue(name: string, value: Value): m.Children {
140 name,
165 'i.material-icons.grey',
187 export function renderDict(dict: Dict): m.Child {