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

browser-module-cache

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

browser-module-cache

Caches browserify-cdn modules using level.js

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
increased by25%
Maintainers
1
Weekly downloads
 
Created
Source

browser-module-cache

Caches browserify-cdn modules using level.js

npm install browser-module-cache

usage

var createCache = require('browser-module-cache')

initialize

createCache(options)

var cache = createCache({
  name: 'browser-module-cache' // name of level.js database
})

put

cache.put(packages, callback)

Saves a browserify-cdn object where the keys bundle and package are required.

cache.put({
  blah: {
    bundle: 'blahblahblah',
    package: {
      name: 'blah',
      author: 'The Dude',
    },
  },
}, function() {
  console.log('saved!')
})

get

cache.get([package, ]callback)

Gets all or one specific package from cache.

cache.get(function(err, modules) {
  console.log('all modules', modules)
})

cache.get('blah', function(err, module) {
  console.log('the blah module', module)
})

clear

cache.clear(callback)

Removes all cached modules.

cache.clear(function(err) {
  console.log('all clean')
})

release history

  • 0.1.0 - initial release

license

Copyright (c) 2013 Kyle Robinson Young
Licensed under the MIT license.

Keywords

FAQs

Package last updated on 08 Jul 2013

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