
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
@borrowdev/node
Advanced tools
[!WARNING]
This package is NOT stable yet. There may be breaking changes with every minor release.It is recommended to wait for the 1.0.0 release before using this package in production.
# npm
npm install @borrowdev/node
# pnpm
pnpm add @borrowdev/node
# yarn
yarn add @borrowdev/node
# bun
bun add @borrowdev/node
Let's use the fixed window algorithm to rate limit our login endpoint to 10 requests per minute.
import { borrow } from "@borrowdev/node";
const { success, timeLeft } = await borrow.limiter("my-limiter-id", "current-user-id", {
limiters: [{
maxRequests: 10,
interval: "minute",
type: "fixed",
}]
});
if (!success) {
return { message: "Rate limit exceeded." + timeLeft !== null ? ` You can try again in ${timeLeft} seconds.` : "" };
}
FAQs
<img src="https://jsr.io/badges/@borrow/node" alt="JSR vers
We found that @borrowdev/node 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
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.