Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Booth provides request-response over socket.io and creates FRP streams from socket.io events
Booth provides request-response over socket.io and creates FRP streams from socket.io events
server:
Booth(socket_io, endpoint =>
{
// register request handler (client will do requests)
endpoint.request.register('ask-server', data =>
{
return { some: 'data' } // can be Promise
})
// request client (client should `register`)
endpoint.request('ask-client', { key: 'server' })
.then(data =>
{
// …
})
})
client:
var client_endpoint = Endpoint(socket_io_client)
// API is symmetric with servers' one
client_endpoint.request('ask-server', { key: 'client' })
.then(data =>
{
// …
})
client_endpoint.request.register('ask-client', data =>
{
return { some: 'client-data' }
})
most
is used as FRP.
server:
import most from 'most'
Booth(socket_io, endpoint =>
{
var feed = most.from([ 1, 2, 3, 4, 5 ])
// register realtime (push to client)
endp.realtime.register('from-server', feed)
// take realtime feed from client
endpoint.realtime('from-client')
/* from here `most` API is available: */
.observe(data =>
{
// …
})
})
client:
var client_endpoint = Endpoint(socket_io_client)
// API is symmetric with servers' one
client_endpoint.realtime('from-server')
.observe(data =>
{
// …
})
var feed_client = most.from([ 5, 4, 3, 2, 1 ])
client_endpoint.realtime.register('from-client', feed_client)
ISC, copyright © 2017, Strider.
FAQs
Booth provides symmetric Event API over websocket or unix domain socket
The npm package booth receives a total of 56 weekly downloads. As such, booth popularity was classified as not popular.
We found that booth demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.