npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

redis-linq

v1.0.0

Published

This package contains simple access to Redis

Readme

					Inventt Linq

This package provides simplified access to redis

METHODS

Save

  • Creates a Key in Redis
  • Parameters :

    • Key - Name to retrieve/change information
    • Object - Data to be retrieved
    • Expiration - In seconds, sets an expiration date for that key
    • Callback - Function to be called when it is done
  • Responses

    • Err
    • Reply

Get

  • Retrieves a specific key from the database
  • Parameters :

    • Key
    • Callback
  • Responses

    • Err
    • Reply - Null if key doesn`t exists

Exists

  • Checks if a Key exists
  • Parameters :

    • Key
    • Callback
  • Responses

    • Err
    • Reply - (0 or 1 )

Delete

  • Removes the Key from the database
  • Parameters :
    • Key

Refresh

  • If a Key is set to expire, this refreshes it to the new expiration date (if it's undefined, it persists the key)
  • Parameters :
    • Key
    • Expiration

Update

  • Changes the object saved under the desired Key
  • Parameters :

    • Key
    • Object
    • Expiration
    • Callback
  • Responses

    • Err
    • Reply

Length

  • Retrieves the length of all keys in the database
  • Parameters :

    • Callback
  • Responses

    • Err
    • Reply

USAGE EXAMPLE :

var db = require('redis-linq');

//saves the key 'example1'

db.Save('example1',{obj:'test'},10,function(err,reply){

if(err)
	console.log('Error occured connecting to redis');

console.log('Result',reply);

//Note that this key will expire after 10 seconds

});

db.Get('example1',function(err,reply){

if(err)
	console.log('Error occured connecting to redis');

if(reply === null)	
	console.log('Key does not exist');


console.log('Result: ',reply);

//this will log:
 Result: {obj:'test'}

})

db.Exists('example1',function(err,reply){

if(err)
	console.log('Error occured connecting to redis');


if(reply == 0)
	console.log('Key expired');
else
	console.log('Key still alive');

});

//deletes key

db.Delete('example1');

// persists key

db.Refresh('example1');

// Refreshes key for another 10 seconds

db.Refresh('example1',10);

//changes the data and expiration time of 'example1'

db.Update('example1',{obj:'test changed'},1000,function(err,reply){

if(err)
	console.log('Error occured connecting to redis');

console.log('Result',reply);

//Note that this key will expire after 1000 seconds

});

db.Length(function(err,reply){

if(err)
	console.log('Error occured connecting to redis');

console.log('Result',reply);
// This will log how many keys are stored in the db

})