
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Klart is a wrapper around node-postgres. It provides
a simple interface to make queries towards a PostgreSQL database. Feel free to reach out with any suggestions on how it could be expanded!
The best way to get a working dev environment is to run use docker compose.
| command | purpose |
|---|---|
docker-comopse up -d | start environment |
yarn ssh | enter the dev environment |
docker-compose down | tear the development environment down |
yarn add klart
All examples use a common Dog-type, looking like this:
type Dog = { name: string; age: number };
import { first } from 'klart';
const fluffy = await first<Dog>('SELECT * FROM dogs WHERE name = $1', ['fluffy']);
console.log(`Retrieved a dog called ${fluffy.name} aged ${fluffy.age}`);
import { rows } from 'klart';
const dogs = await rows<Dog>('SELECT * FROM dogs');
dogs.forEach((dog) => {
console.log(`Retrieved a dog called ${dog.name} aged ${dog.age}`);
});
import { run } from 'klart';
//NOTE: no result returned when using `run`
await run('INSERT INTO dogs (name, age) VALUES($1, $2)', ['Fido', 5]);
Klart, like node-postgres, picks up the same environment variables as lipq.
If you want to ovverride this, you can import withConfiguration from Klart and use that instead (see example below). As Klart really just hands of configuration to node-postgres, details on this page is the best source of information for configuration.
import { withConfiguration } from 'klart';
const { first, rows } = withConfiguration({
user: 'dbuser',
host: 'database.server.com',
database: 'mydb',
password: 'secretpassword',
port: 3211,
});
FAQs
## About
The npm package klart receives a total of 10 weekly downloads. As such, klart popularity was classified as not popular.
We found that klart 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.