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

koatty_store

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koatty_store - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

20

dist/index.d.ts

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

import { MemcacheStore } from "./memcache";
import { RedisStore } from "./redis";

@@ -7,16 +6,5 @@ /**

* @export
* @enum {number}
*/
export declare enum StoreType {
"redis" = "redis",
"memcache" = "memcache"
}
/**
*
*
* @export
* @interface StoreOptions
*/
export interface StoreOptions {
type: StoreType;
key_prefix: string;

@@ -40,8 +28,2 @@ host: string;

/**
* Creates an instance of Store.
* @param {StoreOptions} options
* @memberof Store
*/
constructor(options: StoreOptions);
/**
*

@@ -53,3 +35,3 @@ *

*/
static getInstance(options: StoreOptions): MemcacheStore | RedisStore;
static getInstance(options: StoreOptions): RedisStore;
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Store = exports.StoreType = void 0;
exports.Store = void 0;
/*

@@ -8,7 +8,6 @@ * @Author: richen

* @LastEditors: linyyyang<linyyyang@tencent.com>
* @LastEditTime: 2020-11-30 17:47:47
* @LastEditTime: 2020-12-01 17:37:40
* @License: BSD (3-Clause)
* @Copyright (c) - <richenlin(at)gmail.com>
*/
const memcache_1 = require("./memcache");
const redis_1 = require("./redis");

@@ -19,13 +18,2 @@ /**

* @export
* @enum {number}
*/
var StoreType;
(function (StoreType) {
StoreType["redis"] = "redis";
StoreType["memcache"] = "memcache";
})(StoreType = exports.StoreType || (exports.StoreType = {}));
/**
*
*
* @export
* @class Store

@@ -35,10 +23,2 @@ */

/**
* Creates an instance of Store.
* @param {StoreOptions} options
* @memberof Store
*/
constructor(options) {
return Store.getInstance(options);
}
/**
*

@@ -63,10 +43,3 @@ *

};
switch (options.type) {
case "memcache":
this.instance = new memcache_1.MemcacheStore(options);
break;
default:
this.instance = new redis_1.RedisStore(options);
break;
}
this.instance = new redis_1.RedisStore(options);
return this.instance;

@@ -73,0 +46,0 @@ }

2

dist/redis.js

@@ -9,3 +9,3 @@ "use strict";

* @LastEditors: linyyyang<linyyyang@tencent.com>
* @LastEditTime: 2020-11-30 17:36:28
* @LastEditTime: 2020-12-01 17:37:59
* @License: BSD (3-Clause)

@@ -12,0 +12,0 @@ * @Copyright (c) - <richenlin(at)gmail.com>

{
"name": "koatty_store",
"version": "1.0.1",
"version": "1.0.2",
"description": "Cache store for koatty.",

@@ -48,3 +48,2 @@ "scripts": {

"@types/lodash": "^4.x.x",
"@types/memcached": "^2.2.6",
"@types/node": "^12.x.x",

@@ -61,5 +60,4 @@ "del-cli": "^3.0.1",

"koatty_lib": "^1.x.x",
"koatty_logger": "^1.x.x",
"memcached": "^2.2.2"
"koatty_logger": "^1.x.x"
}
}

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