New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@types/memcached

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/memcached

TypeScript definitions for memcached

  • 2.2.10
  • ts4.5
  • ts4.6
  • ts4.7
  • ts4.8
  • ts4.9
  • ts5.0
  • ts5.1
  • ts5.2
  • ts5.3
  • ts5.4
  • ts5.5
  • ts5.6
  • ts5.7
  • ts5.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
788K
decreased by-13.37%
Maintainers
1
Weekly downloads
 
Created

What is @types/memcached?

@types/memcached provides TypeScript type definitions for the memcached package, which is a client for interacting with Memcached servers. It allows developers to use Memcached in a type-safe manner in TypeScript projects.

What are @types/memcached's main functionalities?

Connecting to a Memcached server

This feature allows you to establish a connection to a Memcached server running on localhost at the default port 11211.

const Memcached = require('memcached');
const memcached = new Memcached('localhost:11211');

Setting a value in Memcached

This feature allows you to store a key-value pair in Memcached with an expiration time of 10 seconds.

memcached.set('key', 'value', 10, function (err) { if (err) console.error(err); });

Getting a value from Memcached

This feature allows you to retrieve a value from Memcached using a key.

memcached.get('key', function (err, data) { if (err) console.error(err); else console.log(data); });

Deleting a value from Memcached

This feature allows you to delete a key-value pair from Memcached.

memcached.del('key', function (err) { if (err) console.error(err); });

Flushing all values from Memcached

This feature allows you to clear all data from the Memcached server.

memcached.flush(function (err) { if (err) console.error(err); });

Other packages similar to @types/memcached

FAQs

Package last updated on 07 Nov 2023

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc