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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@memzy/node-sdk

v1.2.6

Published

Memzy is a sleek, ready-to-use remote memory caching solution crafted for Node.js developers.

Downloads

15

Readme

Memzy: Seamless Remote Memory Caching for Node.js

Memzy is a sleek, ready-to-use remote memory caching solution crafted for Node.js developers.

Why Use Memzy?

  • Simplicity: Memzy is designed for developers who want a caching solution that is straightforward to integrate. No extensive setup procedures or hefty configurations required. Plug in your API key, specify a region, and you're good to go.

  • Remote Memory Management: Memzy allows you to offload your caching needs to our dedicated remote regions, meaning you don't use up your local resources. This also allows for high availability and centralized caching for distributed systems.

  • Quick Prototyping: With Memzy, there's no need for accounts, or credit cards. Use Memzy for quick prototyping and testing without any commitments.

  • Integrated Encryption: Memzy offers built-in encryption capabilities, allowing you to ensure your cached data remains confidential, even in transit and at rest.

Installation

npm install @memzy/node-sdk

Usage

Basic Usage

import { Memzy } from "@memzy/node-sdk";

// You should bring your own "api key." It should be a > 15 < 100 char string.
// Think of API keys as partitions, or namespaces for your data.
const memzy = new Memzy({
  apiKey: "your-api-key",
  region: "atlanta",
});

console.log('Setting key "testKey" to "Hello, Memzy!"');
await memzy.Set("testKey", "Hello, Memzy!");

console.log('Getting value for key "testKey"');
const value = await memzy.Get("testKey");
console.log("Value:", value);

console.log('Deleting key "testKey"');
await memzy.Del("testKey");

console.log('Attempting to get deleted key "testKey"');
try {
  const deletedValue = await memzy.Get("testKey");
  console.log("Value:", deletedValue);
} catch (error) {
  console.log("Expected error:", error.message);
}

console.log('Subscribing to "testEvent"');
memzy.Subscribe("testEvent", (data) => {
  console.log('Received data from "testEvent":', data);
});

console.log('Publishing event "testEvent" with data "This is a test event"');
await memzy.Publish("testEvent", "This is a test event");

Using Encryption

import { Memzy } from "@memzy/node-sdk";

// Generate a 256-bit encryption key using a trusted method and store it securely.
const encryptionKey =
  "78d8339ea613d4cf1012075bd20c289e01565cee906039e03dbc8b2ec4a63df1"; // Example key

const memzy = new Memzy({
  apiKey: "your-api-key",
  region: "atlanta",
  encryptionKey: encryptionKey, // Pass the encryption key here
});

console.log('Setting encrypted key "secureKey" to "This is confidential"');
await memzy.Set("secureKey", "This is confidential");

console.log('Getting decrypted value for key "secureKey"');
const decryptedValue = await memzy.Get("secureKey");
console.log("Decrypted Value:", decryptedValue);