Logo ProcessCore

Helpers Module

Functions and values

Function or value Description

applyOverflow objectType processCoreOnly knownFields obj value

Full Usage: applyOverflow objectType processCoreOnly knownFields obj value

Parameters:

Store all YAML fields whose keys are not in knownFields as dynamic properties on obj.

objectType : string
processCoreOnly : bool
knownFields : Set<string>
obj : DynamicObj
value : YAMLElement

checkType processCoreOnly expected element

Full Usage: checkType processCoreOnly expected element

Parameters:
    processCoreOnly : bool
    expected : string
    element : YAMLElement

Verify the 'type' field, if present, equals the expected value. When processCoreOnly is false the check is skipped and the generic field-by-field decoding path is taken instead (lenient mode for decorated YAML).

processCoreOnly : bool
expected : string
element : YAMLElement

decodeRefOrInline inlineDecoder value

Full Usage: decodeRefOrInline inlineDecoder value

Parameters:
Returns: Choice<string, 'a>
Type parameters: 'a

Decode a field that is either a plain string id reference or a full inline object. Returns Choice1Of2(id) for references, Choice2Of2(decoded) for inline objects.

inlineDecoder : YAMLElement -> 'a
value : YAMLElement
Returns: Choice<string, 'a>

decodeString element

Full Usage: decodeString element

Parameters:
Returns: string
element : YAMLElement
Returns: string

emitOverflow knownPropertyNames obj

Full Usage: emitOverflow knownPropertyNames obj

Parameters:
Returns: (string * YAMLElement) list

Emit all dynamic properties whose lowercase key is not in knownPropertyNames.

knownPropertyNames : Set<string>
obj : DynamicObj
Returns: (string * YAMLElement) list

encodeRef id

Full Usage: encodeRef id

Parameters:
    id : string

Returns: YAMLElement

Encode an @id reference: { "@id": "" }

id : string
Returns: YAMLElement

genericDecodeToObj value

Full Usage: genericDecodeToObj value

Parameters:
Returns: obj

Decode any YAML element into an obj for storage in DynamicObj. Scalars → primitives, sequences → ResizeArray, objects → DynamicObj.

value : YAMLElement
Returns: obj

genericEncodeFromObj value

Full Usage: genericEncodeFromObj value

Parameters:
    value : obj

Returns: YAMLElement

Encode a DynamicObj overflow value back to YAMLElement.

value : obj
Returns: YAMLElement

getMappings element

Full Usage: getMappings element

Parameters:
Returns: (string * YAMLElement) list
element : YAMLElement
Returns: (string * YAMLElement) list

iterSequenceOrSingleton handler value

Full Usage: iterSequenceOrSingleton handler value

Parameters:
handler : YAMLElement -> unit
value : YAMLElement

makeIdSlug s

Full Usage: makeIdSlug s

Parameters:
    s : string

Returns: string
s : string
Returns: string

normalizeId id

Full Usage: normalizeId id

Parameters:
    id : string

Returns: string
id : string
Returns: string

normalizeKey key

Full Usage: normalizeKey key

Parameters:
    key : string

Returns: string
key : string
Returns: string

objToScalarYaml value

Full Usage: objToScalarYaml value

Parameters:
    value : obj

Returns: YAMLElement
value : obj
Returns: YAMLElement

parseScalarToObj value

Full Usage: parseScalarToObj value

Parameters:
    value : string

Returns: obj
value : string
Returns: obj

requireField name element

Full Usage: requireField name element

Parameters:
Returns: YAMLElement
name : string
element : YAMLElement
Returns: YAMLElement

tryDecodeIdReference value

Full Usage: tryDecodeIdReference value

Parameters:
Returns: string option
value : YAMLElement
Returns: string option

tryDecodeSequence _arg1

Full Usage: tryDecodeSequence _arg1

Parameters:
Returns: YAMLElement list option
_arg1 : YAMLElement
Returns: YAMLElement list option

tryDecodeString _arg1

Full Usage: tryDecodeString _arg1

Parameters:
Returns: string option
_arg1 : YAMLElement
Returns: string option

tryDecodeStringResizeArray element

Full Usage: tryDecodeStringResizeArray element

Parameters:
Returns: ResizeArray<string> option
element : YAMLElement
Returns: ResizeArray<string> option

tryGetField name element

Full Usage: tryGetField name element

Parameters:
Returns: YAMLElement option
name : string
element : YAMLElement
Returns: YAMLElement option

tryGetMappings _arg1

Full Usage: tryGetMappings _arg1

Parameters:
Returns: (string * YAMLElement) list option
_arg1 : YAMLElement
Returns: (string * YAMLElement) list option

unwrapSingleObject _arg1

Full Usage: unwrapSingleObject _arg1

Parameters:
Returns: YAMLElement
_arg1 : YAMLElement
Returns: YAMLElement

writeYaml whitespace element

Full Usage: writeYaml whitespace element

Parameters:
Returns: string

Render a YAMLElement to a YAML string with the given indentation width (default 2).

whitespace : int option
element : YAMLElement
Returns: string

yamlMap pairs

Full Usage: yamlMap pairs

Parameters:
Returns: YAMLElement
pairs : (string * YAMLElement) list
Returns: YAMLElement

yamlSeq items

Full Usage: yamlSeq items

Parameters:
Returns: YAMLElement
items : YAMLElement list
Returns: YAMLElement

yamlValue s

Full Usage: yamlValue s

Parameters:
    s : string

Returns: YAMLElement
s : string
Returns: YAMLElement

Type something to start searching.