
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
The JavaScript implementation of Gotalk currently only supports connecting over web sockets from modern web browsers. A future version might provide "listening" abilities and support for other environments like Nodejs.
Here's an example of connecting to a web server, providing a "prompt" operation (which the server can invoke at ay time to ask the user some question) and finally invoking a "echo" operation on the server.
gotalk.handle('prompt', function (params, result) {
var answer = prompt(params.question, params.placeholderAnswer);
result(answer);
})
// open a connection
const c = gotalk.connection()
// do stuff when the connection state changes
c.on("open", () => console.log("connection opened"))
c.on("close", () => console.log("connection closed"))
// make a request
let pong = await c.request("ping")
console.log("ping reply:", pong)
When using the gotalk.js
file (e.g. in a web browser), the API is exposed as window.gotalk
.
If the gotalk
directory containing the Gotalk CommonJS module is used, the API is returned as
an object from require('./gotalk')
.
See gotalk.d.ts
for documentation.
FAQs
Gotalk client library
The npm package gotalk receives a total of 12 weekly downloads. As such, gotalk popularity was classified as not popular.
We found that gotalk 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.