
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
@yomo/presence
Advanced tools
Edge Infra for Realtime Web Applications, geo-distributed architecture ⚡️
Presencejs
is a JavaScript library that enables the creation of real-time web applications with a secure, low-latency, and high-performance geo-distributed architecture.
Key Features:
These React Serverless Components are built with presencejs
:
Live collaborator avatars for multiplayer web apps
presencejs
to your web appUsing npm
$ npm i --save @yomo/presence
Using yarn
$ yarn add @yomo/presence
Using pnpm
$ pnpm i @yomo/presence
Presence
instanceimport Presence from '@yomo/presence';
// create an instance.
const p = new Presence('https://prsc.yomo.dev', {
url: process.env.NEXT_PUBLIC_PRESENCE_URL,
publicKey: process.env.NEXT_PUBLIC_PRESENCE_PUBLIC_KEY,
id,
appId: process.env.NEXT_PUBLIC_APP_ID,
debug: true,
});
p.on('connected', () => {
console.log('Connected to server: ', p.host);
});
Channel
add subscribe to peers online event:
const c = p.joinChannel('group-hug', myState);
c.subscribePeers((peers) => {
peers.forEach((peer) => {
console.log(peer + " is online")
}
});
const cb = () => {
const state = document.hidden ? 'away' : 'online';
c.broadcast('hidden-state-change', { state });
};
document.addEventListener('visibilitychange', cb)
const unsubscribe = channel.subscribe(
'hidden-state-change',
({ payload, peerState }) => {
console.log(`${peerState.id} change visibility to: ${payload}`)
})
prscd
backend servicesee prscd
joinChannel
: return a Channel
objectsubscribePeers
: observe peers online and offline events.broadcast
: broadcast events to all other peers.subscribe
: observe events indicatedleave
: leave from a Channel
The MIT License.
FAQs
Edge Infra for Realtime Web Applications, geo-distributed architecture ⚡️
The npm package @yomo/presence receives a total of 47 weekly downloads. As such, @yomo/presence popularity was classified as not popular.
We found that @yomo/presence demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.