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

yach.nim.util

Package Overview
Dependencies
Maintainers
9
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yach.nim.util - npm Package Compare versions

Comparing version 0.1.3 to 0.2.0-beta

0

lib/elk.js

@@ -0,0 +0,0 @@ // yach.util.data

@@ -0,0 +0,0 @@ /**

24

lib/yach.nim.util.js

@@ -10,4 +10,4 @@ // elk

// qiao
import * as q from "qiao.ls.js";
import _yachDB from 'yach.util.indexeddb';
const yachDB = _yachDB('team');

@@ -61,8 +61,14 @@ // get user

// get team
let __getTeamTimes = 0;
export function getTeam(id) {
return new Promise(function (resolve, reject) {
// var team = q.cache('cache.info.team', id);
// if(team) return resolve(team);
let startTime = Date.now();
const tag = __getTeamTimes++;
let startTime = Date.now();
return new Promise(async function (resolve, reject) {
console.time(`===getTeamTime${tag}:${id}`);
const team = await yachDB.getItem(id)
if(team) {
console.timeEnd(`===getTeamTime${tag}:${id}`);
return resolve(team);
}
window.nim.getTeam({

@@ -72,6 +78,6 @@ teamId: id,

elk("window.nim.getTeam", startTime);
console.warn(`===getTeamTime${tag}:${id}没走自定义缓存`)
console.timeEnd(`===getTeamTime${tag}:${id}`);
if (err) return reject(err);
// q.cache('cache.info.team', id, obj);
yachDB.setItem(id, obj); //更新下缓存
return resolve(obj);

@@ -78,0 +84,0 @@ },

{
"name": "yach.nim.util",
"version": "0.1.3",
"version": "0.2.0-beta",
"license": "MIT",

@@ -11,4 +11,5 @@ "description": "yach nim: util",

"qiao.ls.js": "0.0.8",
"yach.util.data": "0.0.5"
"yach.util.data": "0.0.5",
"yach.util.indexeddb": "^0.0.1"
}
}

@@ -0,0 +0,0 @@ # yach.nim.util

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