src code

instance method Spah.StateClient#reduceState

Spah.StateClient#reduceState(target, attachments, callback) → void
  • target (Spah.State) – A Spah.State instance to clone and reduce
  • attachments (Objects) – An attachment object supplied to the reducer strategies
  • callback (Function) – The callback for completion. Receives (target, attachments)

Clones any given Spah.State instance and applies all registered “reduce” strategies to it.