MCPcopy Create free account
hub / github.com/SplootCode/splootcode / setValue

Method setValue

packages/language-web/types/dataset/row.ts:34–42  ·  view source on GitHub ↗
(fieldName: string, value: string)

Source from the content-addressed store, hash-verified

32 }
33
34 setValue(fieldName: string, value: string) {
35 for (const valueEntry of this.getValues().children as DataEntrySplootNode[]) {
36 if (valueEntry.getFieldName() === fieldName) {
37 valueEntry.setValue(value)
38 return
39 }
40 }
41 this.getValues().addChild(new SplootDataStringEntry(null, fieldName, value))
42 }
43
44 getValuesAsList(order: string[]) {
45 // Returns a list of the form [{value: x}, ...]

Callers 1

onEditMethod · 0.45

Calls 3

getValuesMethod · 0.95
getFieldNameMethod · 0.80
addChildMethod · 0.80

Tested by

no test coverage detected