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

ag-utilities

Package Overview
Dependencies
Maintainers
1
Versions
232
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ag-utilities - npm Package Compare versions

Comparing version 1.1.184 to 1.1.185

20

AgCache.d.ts
export declare const AgCache: {
append: <T>(id: string, obj: T) => void;
append: <T>(id: string, obj: T) => {
value: T;
time: Date;
}[];
peek: <T_1 = any>(id: string) => {

@@ -7,8 +10,8 @@ value: T_1;

}[];
get: <T_2>(id: string, obj: T_2) => {
value: T_2;
time: Date;
}[];
stop: () => void;
create(span: number): {
append: <T>(id: string, obj: T) => void;
append: <T>(id: string, obj: T) => {
value: T;
time: Date;
}[];
peek: <T_1 = any>(id: string) => {

@@ -18,7 +21,4 @@ value: T_1;

}[];
get: <T_2>(id: string, obj: T_2) => {
value: T_2;
time: Date;
}[];
stop: () => void;
};
};

@@ -15,5 +15,6 @@ "use strict";

exports.AgCache = void 0;
var AgVueWrap_1 = require("./AgVueWrap");
function create(span) {
var datas = {};
setInterval(function () {
var datas = (0, AgVueWrap_1.reactive)({});
var cleaner = setInterval(function () {
var min = new Date().getTime() - span;

@@ -24,3 +25,2 @@ for (var key in datas) {

}
// if (datas[key].length === 0) delete datas[key]
}

@@ -35,2 +35,3 @@ }, 1000);

}
return peek(id);
}

@@ -41,7 +42,6 @@ function peek(id) {

}
function get(id, obj) {
append(id, obj);
return peek(id);
function stop() {
clearInterval(cleaner);
}
return { append: append, peek: peek, get: get };
return { append: append, peek: peek, stop: stop };
}

@@ -48,0 +48,0 @@ var instance = create(1000 * 60);

{
"name": "ag-utilities",
"version": "1.1.184",
"version": "1.1.185",
"author": "fangxq",

@@ -5,0 +5,0 @@ "license": "MIT",

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