npm.io
3.0.1 • Published 3 years ago

@tangle/simple-set

Licence
LGPL-3.0-or-later
Version
3.0.1
Deps
1
Size
12 kB
Vulns
0
Weekly
0

@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 instance
  • mergeNode is the proposed merge-node
  • field String contains the the data fields node.data[field]

Used with modules such as:

  • @tangle/strategy@2
  • ssb-crut
__INLINE_CODE_3__
__INLINE_CODE_4__
__INLINE_CODE_5__
__INLINE_CODE_6__
__INLINE_CODE_7__
__INLINE_CODE_8__
__INLINE_CODE_9__
__INLINE_CODE_10__
__INLINE_CODE_11__

where:

  • __INLINE_CODE_12__ is a __INLINE_CODE_13__ instance
  • __INLINE_CODE_14__ is the proposed merge-node
  • __INLINE_CODE_15__ String contains the the data fields __INLINE_CODE_16__

Used with modules such as:

  • @tangle/strategy@2
  • ssb-crut

Keywords