koa78-upinfo
Advanced tools
Comparing version 3.1.2 to 4.0.0
@@ -51,5 +51,5 @@ export default class UpInfo { | ||
private _decodeBase64; | ||
getMaster(): UpInfo; | ||
getGuest(): UpInfo; | ||
getNewid(): string; | ||
static getMaster(): UpInfo; | ||
static getGuest(): UpInfo; | ||
static getNewid(): string; | ||
inArray(o: string, cols: string[]): boolean; | ||
@@ -56,0 +56,0 @@ checkCols(cols: string[]): string; |
@@ -101,3 +101,3 @@ "use strict"; | ||
this.sid ??= ""; | ||
this.mid = pars.mid ?? this.getNewid(); | ||
this.mid = pars.mid ?? UpInfo.getNewid(); | ||
this.midpk = pars.midpk ?? -1; | ||
@@ -113,3 +113,3 @@ this.getnumber = +(pars.getnumber ?? 15); | ||
this.backtype = pars.backtype ?? "json"; | ||
this.upid = pars.upid ?? this.getNewid(); | ||
this.upid = pars.upid ?? UpInfo.getNewid(); | ||
this.cache = req.header['cache'] ?? pars.cache ?? this.mid; | ||
@@ -179,3 +179,3 @@ this.cols = typeof this.colsn === 'string' ? JSON.parse(this.colsn) : this.colsn; | ||
} | ||
getMaster() { | ||
static getMaster() { | ||
const up2 = new UpInfo(null); | ||
@@ -195,3 +195,3 @@ Object.assign(up2, { | ||
; | ||
getGuest() { | ||
static getGuest() { | ||
const up2 = new UpInfo(null); | ||
@@ -211,3 +211,3 @@ Object.assign(up2, { | ||
; | ||
getNewid() { | ||
static getNewid() { | ||
const s4 = () => Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1); | ||
@@ -214,0 +214,0 @@ return `${s4()}${s4()}-${s4()}-${s4()}-${s4()}-${s4()}${s4()}${s4()}`; |
{ | ||
"name": "koa78-upinfo", | ||
"version": "3.1.2", | ||
"version": "4.0.0", | ||
"description": "nodejs koa78封装 上传类", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -115,3 +115,3 @@ | ||
this.mid = pars.mid ?? this.getNewid(); | ||
this.mid = pars.mid ?? UpInfo.getNewid(); | ||
this.midpk = pars.midpk ?? -1; | ||
@@ -130,3 +130,3 @@ this.getnumber = +(pars.getnumber ?? 15); | ||
this.backtype = pars.backtype ?? "json"; | ||
this.upid = pars.upid ?? this.getNewid(); | ||
this.upid = pars.upid ?? UpInfo.getNewid(); | ||
this.cache = req.header['cache'] ?? pars.cache ?? this.mid; | ||
@@ -201,3 +201,3 @@ | ||
getMaster(): UpInfo { | ||
static getMaster(): UpInfo { | ||
const up2 = new UpInfo(null); | ||
@@ -217,3 +217,3 @@ Object.assign(up2, { | ||
getGuest(): UpInfo { | ||
static getGuest(): UpInfo { | ||
const up2 = new UpInfo(null); | ||
@@ -233,3 +233,3 @@ Object.assign(up2, { | ||
getNewid(): string { | ||
static getNewid(): string { | ||
const s4 = (): string => Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1); | ||
@@ -236,0 +236,0 @@ return `${s4()}${s4()}-${s4()}-${s4()}-${s4()}-${s4()}${s4()}${s4()}`; |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
37580
0