briancavalier/swym — pull request #1 by briancavalier (2014-11-19 02:53:43+00:00)
Title: Simplify init. Add syncState helper. Refactor SyncStrategy

This change removes the init() function in favor of just passing in a
store. If async init is needed, use
AsyncStore.from(promiseForAnotherStore) or
AsyncStore.from(store).map(asyncInitFunction)

This also moves the send function to syncStrategy.sync() which is the
point at which it is actually needed. Not sure if that's more or less
ergonomic, but it does free SRef from being client-specific. It could
be used in server code (which awaits incoming patches rather than
actively sending), but not sure if that's a valid use case yet.