
Security News
ECMAScript 2025 Finalized with Iterator Helpers, Set Methods, RegExp.escape, and More
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
upstash-redis-level
Advanced tools
An abstract-level
database backed by upstash/redis.
:pushpin: Which module should I use? What is
abstract-level
? Head over to the FAQ.
const { RedisLevel } = require('upstash-redis-level')
const { Redis } = require('@upstash/redis')
const db = new RedisLevel({
redis: new Redis({
url: process.env.KV_REST_API_URL || 'http://localhost:8079',
token: process.env.KV_REST_API_TOKEN || 'example_token',
}),
debug: process.env.DEBUG === 'true' || false,
})
// Add an entry with key 'a' and value 1
await db.put('a', 1)
// Add multiple entries
await db.batch([{ type: 'put', key: 'b', value: 2 }])
// Get value of key 'a': 1
const value = await db.get('a')
// Iterate entries with keys that are greater than 'a'
for await (const [key, value] of db.iterator({ gt: 'a' })) {
console.log(value) // 2
}
The API of upstash-redis-level
follows that of abstract-level
with three additional constructor options (see below).
db = new RedisLevel([options])
Besides abstract-level
options, the optional options
object may contain:
@upstash/redis
clientlevel
ZRANGE level:z - + BYLEX
HGET level:h <key>
With npm do:
npm install upstash-redis-level
See the Contribution Guide for more details.
See LICENSE for more details.
FAQs
@upstash/redis backed abstract-level database for Node.js
The npm package upstash-redis-level receives a total of 387 weekly downloads. As such, upstash-redis-level popularity was classified as not popular.
We found that upstash-redis-level 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
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.