Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
`Verokv` is a lightweight Node.js client SDK for interacting with a key-value store server over a TCP connection. It allows you to easily connect to the server and perform `set` and `get` operations on key-value pairs.
Verokv
is a lightweight Node.js client SDK for interacting with a key-value store server over a TCP connection. It allows you to easily connect to the server and perform set
and get
operations on key-value pairs.
Make sure you have Verokv server setup. Read more here
To use Verokv in your project, add it to your project dependencies.
npm install verokv-ts
# OR
pnpm add verokv-ts
# OR
yarn install verokv-ts
import Verokv from 'verokv';
Initialize a Verokv instance by providing the server's hostname and port number.
const verokv = new Verokv('localhost', 6379);
Use the set method to store a value with a specified key.
verokv.set('name', 'Alice')
.then(() => {
console.log('Key-value pair set successfully');
})
.catch((err) => {
console.error('Error setting key-value:', err);
});
Use the get method to retrieve the value of a specific key.
verokv.get('name')
.then((value) => {
console.log('Retrieved value:', value);
})
.catch((err) => {
console.error('Error retrieving key-value:', err);
});
Verokv handles connection and request errors automatically. If an error occurs during a set or get operation, the returned promise will be rejected with an error message.
Here's a complete example of using Verokv to connect to a key-value store server, set a key-value pair, and retrieve it.
import Verokv from 'verokv';
const verokv = new Verokv('localhost', 6379);
verokv.set('username', 'johndoe')
.then(() => {
return verokv.get('username');
})
.then((value) => {
console.log('Retrieved username:', value);
})
.catch((err) => {
console.error('Operation error:', err);
});
FAQs
`Verokv` is a lightweight Node.js client SDK for interacting with a key-value store server over a TCP connection. It allows you to easily connect to the server and perform `set` and `get` operations on key-value pairs.
We found that verokv-ts 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.