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

eidetic

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eidetic - npm Package Compare versions

Comparing version 0.2.2 to 0.3.0

4

lib/eidetic.js

@@ -48,2 +48,6 @@ module.exports = function Cache(options) {

this.keys = function() {
return Object.keys(cachedItems);
};
this.get = function(key) {

@@ -50,0 +54,0 @@ logger.log('Attempting to get entry from cache under key: ' + key);

5

package.json

@@ -7,5 +7,5 @@ {

],
"version": "0.2.2",
"version": "0.3.0",
"dependencies": {
"clone": "0.1.x"
"clone": "0.2.x"
},

@@ -17,3 +17,2 @@ "devDependencies": {

"blanket": "1.x.x",
"node-dependencies": "0.x.x",
"coveralls": "2.x.x",

@@ -20,0 +19,0 @@ "mocha-lcov-reporter": "0.x.x"

@@ -36,2 +36,15 @@ var assert = require('assert'),

});
it('should give all keys in the cache', function(done) {
cache = new Cache({maxSize: 2});
cache.put('key1', testValue);
cache.put('key2', testValue2);
assert(cache.keys() instanceof Array, 'The keys should be an Array');
assert.strictEqual(cache.keys().length, 2, 'The number of keys should be 2');
assert(cache.keys().indexOf('key1') >= 0, 'The array should contain key1');
assert(cache.keys().indexOf('key2') >= 0, 'The array should contain key2');
done();
});
});

@@ -38,0 +51,0 @@ describe('get()', function() {

Sorry, the diff of this file is not supported yet

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