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

@koopjs/cache-memory

Package Overview
Dependencies
Maintainers
7
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@koopjs/cache-memory - npm Package Compare versions

Comparing version 2.0.3 to 3.0.0

16

package.json
{
"name": "@koopjs/cache-memory",
"version": "2.0.3",
"version": "3.0.0",
"description": "An in-memory cache for KOop",
"main": "src/index.js",
"scripts": {
"test": "standard src && tape test/*.js | tap-spec"
"test": "tape src/**/*.spec.js | tap-spec",
"test:cov": "nyc --reporter=text-summary --reporter=html tape './src/**/*.spec.js' | tap-spec",
"test:cov:unit": "nyc --reporter=text-summary --reporter=html tape 'src/**/*.spec.js' | tap-spec"
},

@@ -28,8 +30,12 @@ "repository": {

"license": "Apache-2.0",
"files": [
"src/**/*.js",
"index.d.ts",
"!**/*.spec.js"
],
"bugs": {
"url": "https://github.com/koopjs/koop-cache-memory/issues"
"url": "https://github.com/koopjs/koop/issues"
},
"homepage": "https://github.com/koopjs/koop-cache-memory#readme",
"homepage": "https://github.com/koopjs/koop#readme",
"devDependencies": {
"standard": "^14.0.0",
"tap-spec": "^5.0.0",

@@ -36,0 +42,0 @@ "tape": "^5.0.0"

@@ -1,2 +0,1 @@

const Util = require('util');
const EventEmitter = require('events');

@@ -11,7 +10,7 @@ const _ = require('lodash');

class Cache extends EventEmitter {
static name = 'Memory Cache';
static pluginName = 'Memory Cache';
static type = 'cache';
static version = require('../package.json').version;
constructor(options = {}) {
constructor() {
super();

@@ -32,3 +31,3 @@ this.featuresStore = new Map();

update(key, geojson, options = {}, callback = noop) {
update(key, geojson, options = {}, callback = noop) { // eslint-disable-line
if (!this.featuresStore.has(key)) {

@@ -56,3 +55,3 @@ return callback(new Error('Resource not found'));

append(key, geojson, options = {}, callback = noop) {
append(key, geojson, options = {}, callback = noop) { // eslint-disable-line
const { features } = asCachableGeojson(geojson);

@@ -85,3 +84,3 @@ const existingFeatures = this.featuresStore.get(key);

createStream(key, options = {}) {
createStream(key, options = {}) { // eslint-disable-line
const features = this.featuresStore.get(key);

@@ -124,3 +123,3 @@ return Readable.from(features);

catalogUpdate = function (key, update, options = {}, callback = noop) {
catalogUpdate = function (key, update, options = {}, callback = noop) { // eslint-disable-line
if (!this.catalogStore.has(key)) {

@@ -127,0 +126,0 @@ return callback(new Error('Resource not found'));

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