@tangle/simple-set
v3.0.1
Published
a strategy for Set-like transformations
Downloads
32
Readme
@tangle/simple-set
see tests for examples.
API
SimpleSet(idPattern) => simpleSet
idPattern
String (optional)- a pattern which all id's going into the set must pass
- default
'^.+$'
simpleSet.schema
simpleSet.isValid
simpleSet.identity() => I
simpleSet.concat() => I
simpleSet.mapFromInput(input, currentTips) => T
simpleSet.mapToOutput(T) => t
simpleSet.isConflict() => False
simpleSet.isValidMerge() => True
simpleSet.merge(graph, mergeNode, field) => T
where:
graph
is a@tangle/graph
instancemergeNode
is the proposed merge-nodefield
String contains the the data fieldsnode.data[field]
Used with modules such as:
- @tangle/strategy@2
- ssb-crut