Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Readme
A simple node.js wrapper for VNDB API. Reference: https://vndb.org/d11.
$ npm install vndb
VNDB
exposes an object that contains only a single function .start([host], [port])
. This is an asynchronous function that tries to connect to VNDB API.
const VNDB = require('vndb');
(async () => {
try {
const vndb = await VNDB.start();
console.log('Connected!');
} catch (e) {
console.log('Something happened when connecting to VNDB API');
}
})();
You can pass in host/port optionally. This is not required 99% of the times, unless VNDB changes host/port.
const vndb = await VNDB.start('myvndb.com', 1234);
The start function itself returns an object that contains the socket and 2 convenient methods to interact with it.
vndb.write(message)
Write a raw message to VNDB API. Specification should follow https://vndb.org/d11. This function will add terminator and queue the message accordingly, as one socket can only send/receive one message at a time.
const vndb = await VNDB.start();
const res0 = await vndb.write('login {"protocol":1,"client":"VNDB-Reborn-Tester","clientver":"0.0.1"}');
const res1 = await vndb.write('dbstats');
const res2 = await vndb.write('get vn basic,anime (id = 17)');
vndb.end()
End the socket connection. Can be await-ed if you want to make sure that it really ends.
const vndb = await VNDB.start();
const res0 = await vndb.write('login {"protocol":1,"client":"VNDB-Reborn-Tester","clientver":"0.0.1"}');
await vndb.end();
vndb.socket
The socket object, an instance of native tls.TLSSocket
.
debug module is included and used for debugging purpose, under vndb
namespace.
DEBUG=vndb node index.js
FAQs
VNDB API wrapper
The npm package vndb receives a total of 29 weekly downloads. As such, vndb popularity was classified as not popular.
We found that vndb 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.