packages/data-point/lib/accumulator/factory.js
function create (spec) {
  const accumulator = new Accumulator()

  accumulator.value = spec.value
  accumulator.context = spec.context
  accumulator.reducer = {
    spec: spec.context
  }
  accumulator.entityOverrides = merge({}, spec.entityOverrides)
  accumulator.locals = merge({}, spec.locals)
  accumulator.values = spec.values
  accumulator.trace = spec.trace
  accumulator.debug = debug

  return accumulator
}
function create (spec) {
  const accumulator = new Accumulator()

  accumulator.value = spec.value
  accumulator.context = spec.context
  accumulator.reducer = {
    spec: spec.context
  }
  accumulator.entityOverrides = merge({}, spec.entityOverrides)
  accumulator.locals = merge({}, spec.locals)
  accumulator.values = spec.values
  accumulator.trace = spec.trace
  accumulator.debug = debug

  return accumulator
}
function create ( spec ) { const accumulator = new Accumulator ( ) accumulator . value = spec . value accumulator . context = spec . context accumulator . reducer = { spec : spec . context } accumulator . entityOverrides = merge ( { } , spec . entityOverrides ) accumulator . locals = merge ( { } , spec . locals ) accumulator . values = spec . values accumulator . trace = spec . trace accumulator . debug = debug return accumulator }
creates new Accumulator based on spec
@param  {Object} spec - acumulator spec
@return {Source}
creates new Accumulator based on spec