[keys] support string-argument (make it regexp) #15

Merged
merged 1 commit into from Jun 3, 2012

Conversation

Projects
None yet
2 participants
Contributor

guybrush commented Jun 1, 2012

with this PR one can do:

var rpc = require('rpc-stream')
var v = require('eventvat')()
var s = rpc(v)
var c = rpc()
c.pipe(s).pipe(c)
var r = c.wrap(['set','keys'])
v.onAny(function(){console.log(this.event,'',[].slice.call(arguments))})
r.set('foo','bar')
r.keys('f.*')
// output:
// set foo → [ 'bar' ]
// set → [ 'foo', 'bar' ]
// keys → [ /f.*/, [ 'foo' ] ]

(also it would be easier to implement in guybrush/socketvat)

@0x00A 0x00A pushed a commit that referenced this pull request Jun 3, 2012

Paolo Fragomeni Merge pull request #15 from guybrush/keysWithString
[keys] support string-argument (make it regexp)
6430efa

@0x00A 0x00A merged commit 6430efa into 0x00A:master Jun 3, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment