
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.
restdatasource
Advanced tools
A simple and flexible datasource library for Javascript with REST support. Features pagination, search, local buffering and navigation (next/prev), inspired by Delphi Datasource simplicity.
A TypeScript library to consume REST APIs in a simple way, with record buffering, page navigation, and full CRUD support.
Perfect when you need to handle pagination, keep a local cache of records, and control navigation between them.
bufferSize)next, prev, goto, first, last)search, findBy)insert, update, delete)dump() for debuggingnpm install restdatasource
import axios from "axios";
import { RestDataSource } from "restdatasource";
const api = new RestDataSource("http://localhost:3000/users", {
axios: axios.create({ baseURL: "http://localhost:3000" }),
bufferSize: 50,
primaryKey: "id"
});
async function main() {
await api.load(); // First Load
console.log(api.current()); // Show current row
console.log(await api.next()); // Next
console.log(await api.prev()); // Previous
console.log(await api.goto(120)) // Goto to global index 128
}
main();
// Pesquisa por nome
await api.findBy("name", "Felipe");
// Pesquisa com múltiplos filtros
await api.search({ status: "active", age: 30 });
// Criar
await api.insert({ name: "Novo usuário", email: "teste@mail.com" });
// Atualizar
await api.update(1, { email: "novoemail@mail.com" });
// Deletar
await api.delete(1);
| Propriedade | Tipo | Padrão | Descrição |
|---|---|---|---|
| endpoint | string | - | API endpoint (required) |
| axios | Axios | axios.create() | Custom Axios client |
| page | number | 1 | Initial page |
| bufferSize | number | 100 | Number of records per page (buffer size) |
| primaryKey | string | "id" | Primary key field in records |
{
"rows": [ ... ],
"count": 999
}
FAQs
A simple and flexible datasource library for Javascript with REST support. Features pagination, search, local buffering and navigation (next/prev), inspired by Delphi Datasource simplicity.
We found that restdatasource demonstrated a healthy version release cadence and project activity because the last version was released less than 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.