Closed Raynos closed 11 years ago
this looks good, but I'm not convinced that Scuttlebutt should itself be a through stream, though, it's more tightly coupled to the subclass than a stream is.
On Thu, Aug 30, 2012 at 7:11 AM, Raynos notifications@github.com wrote:
- renamed histroy to history
- deleted id.js and timestamp.js
- added Scuttlebutt.updateIsRecent utility exposure for u.filter
- changed _update to write. Scuttlebutt is now a through stream, almost. Need to implement destroy and "end" and "close" and pause and resume.
- changed reference to update event to be data event
- use emitData
You can merge this Pull Request by running:
git pull https://github.com/Raynos/scuttlebutt master
Or view, comment on, or merge it at:
https://github.com/dominictarr/scuttlebutt/pull/4 Commit Summary
- cleanup
- no more dead code
File Changes
- M events.js (2)
- D id.js (9)
- M index.js (17)
- M model.js (2)
- M test/index.js (32)
- M test/integrate.js (5)
- D timestamp.js (47)
Patch Links
- https://github.com/dominictarr/scuttlebutt/pull/4.patch
https://github.com/dominictarr/scuttlebutt/pull/4.diff
— Reply to this email directly or view it on GitHubhttps://github.com/dominictarr/scuttlebutt/pull/4.
@dominictarr thinking about it more. scuttlebutt should not be a stream.
it should not have a write method or emit data events. that way a subclass can be a stream.
should be _update and emit update events
yeah, I just don't want to call the update event "update" because that collides with what you'd expect for a Observable 'update' event.
also, _update is internal. users subclasses should call localUpdate(key, value) instead.
On Thu, Aug 30, 2012 at 7:42 PM, Raynos notifications@github.com wrote:
@dominictarr https://github.com/dominictarr thinking about it more. scuttlebutt should not be a stream.
it should not have a write method or emit data events. that way a subclass can be a stream.
should be _update and emit update events
— Reply to this email directly or view it on GitHubhttps://github.com/dominictarr/scuttlebutt/pull/4#issuecomment-8167886.
@dominictarr then emit "_update"
events to reflect the internal _update
name.
yup, that works! and it suggests to the user: it's none of your business! which is what I want.
On Thu, Aug 30, 2012 at 8:36 PM, Raynos notifications@github.com wrote:
@dominictarr https://github.com/dominictarr then emit "_update" events to reflect the internal _update name.
— Reply to this email directly or view it on GitHubhttps://github.com/dominictarr/scuttlebutt/pull/4#issuecomment-8169721.
cool, I merged this then added a commit to make it _update()
and emit("_update", update)
histroy
tohistory
Scuttlebutt.updateIsRecent
utility exposure foru.filter
_update
towrite
. Scuttlebutt is now a through stream, almost. Need to implementdestroy
and"end"
and"close"
andpause
andresume
.emitData