Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

felix

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

felix

In-memory caching module for JavaScript

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

felix Build Status

In-memory caching module for JavaScript

Installing

$ npm install felix
# or
$ bower install felix

Example

var felix = require('felix');
var cache = felix.create('example');

cache.put('foo', 123);
cache.put('bar', 456);
console.log(cache.get('foo')); // 123
console.log(cache.get('bar')); // 456
console.log(cache.size()); // 2

cache.remove('foo');
console.log(cache.size()); // 1

cache.clear();
console.log(cache.size()); // 0

API

felix

The top level API for felix is used to manage stored Cache objects.

felix.create(id)

Construct a cache object identified by id

felix.get(id)

Get a cache object by it's identifier

felix.remove(id)

Remove a cache by it's identifier

felix.clear()

Clear all caches

Cache

The Cache object is what is returned by felix.create and felix.get.

put(key, val)

Put a key-value pair into the cache

get(key)

Get the cached value for key

remove(key)

Remove the cached value for key

clear()

Clear all cached values

size()

Get the size of the cache

keys()

Get all the cache keys

License

MIT

Keywords

FAQs

Package last updated on 03 Jan 2015

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