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

hashlru

Package Overview
Dependencies
Maintainers
3
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hashlru - npm Package Compare versions

Comparing version 2.1.0 to 2.2.0

4

index.js

@@ -38,2 +38,6 @@ module.exports = function (max) {

else update(key, value)
},
clear: function () {
cache = Object.create(null)
_cache = Object.create(null)
}

@@ -40,0 +44,0 @@ }

2

package.json
{
"name": "hashlru",
"description": "simpler faster substitute for LRU",
"version": "2.1.0",
"version": "2.2.0",
"homepage": "https://github.com/dominictarr/hashlru",

@@ -6,0 +6,0 @@ "repository": {

@@ -83,2 +83,14 @@ # hashlru

### lru.has(key) => boolean
Checks if the `key` is in the cache.
### lru.remove(key)
Removes the `key` from the cache.
### lru.clear()
Empties the entire cache.
## License

@@ -88,1 +100,4 @@

@@ -42,1 +42,6 @@ var assert = require('assert')

assert.equal(lru.has('test2'), false)
// clear
assert.equal(lru.has('test'), true)
lru.clear()
assert.equal(lru.has('test'), false)
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