@maiyunnet/kebab 3.2.12 → 3.2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
- package/sys/mod.d.ts +4 -4
- package/sys/mod.js +4 -4
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* --- 本文件用来定义每个目录实体地址的常量 ---
|
|
7
7
|
*/
|
|
8
8
|
/** --- 当前系统版本号 --- */
|
|
9
|
-
export const VER = '3.2.
|
|
9
|
+
export const VER = '3.2.13';
|
|
10
10
|
// --- 服务端用的路径 ---
|
|
11
11
|
const imu = decodeURIComponent(import.meta.url).replace('file://', '').replace(/^\/(\w:)/, '$1');
|
|
12
12
|
/** --- /xxx/xxx --- */
|
package/package.json
CHANGED
package/sys/mod.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ declare class Rows<T extends Mod> implements CRows<T> {
|
|
|
19
19
|
get length(): number;
|
|
20
20
|
/** --- 通过索引获取一个对象 --- */
|
|
21
21
|
item(index: number): T;
|
|
22
|
-
/** ---
|
|
22
|
+
/** --- 转换为数组对象,获取的是新创建的数组 --- */
|
|
23
23
|
toArray(): Array<Record<string, any>>;
|
|
24
24
|
/** --- 根据规则筛掉项,predicate 返回 true 代表保留 --- */
|
|
25
25
|
filter(predicate: (value: T, index: number) => boolean): Rows<T>;
|
|
@@ -272,7 +272,7 @@ export default class Mod {
|
|
|
272
272
|
'index'?: string;
|
|
273
273
|
}): Promise<any[] | false>;
|
|
274
274
|
/**
|
|
275
|
-
* --- 将 key val
|
|
275
|
+
* --- 将 key val 组成的数据列表转换为原生对象模式,获取的是新创建的数组 ---
|
|
276
276
|
* @param obj 要转换的 kv 数据列表
|
|
277
277
|
*/
|
|
278
278
|
static toArrayByRecord<T extends Mod>(obj: Record<string, T>): Record<string, Record<string, any>>;
|
|
@@ -453,7 +453,7 @@ export default class Mod {
|
|
|
453
453
|
*/
|
|
454
454
|
format(sql?: string, data?: any[]): string;
|
|
455
455
|
/**
|
|
456
|
-
* ---
|
|
456
|
+
* --- 获取值对象,获取的是新创建的数组 ---
|
|
457
457
|
*/
|
|
458
458
|
toArray<TC extends abstract new (...args: any) => any>(): TOnlyProperties<InstanceType<TC>> & Record<string, any>;
|
|
459
459
|
/**
|
|
@@ -481,7 +481,7 @@ export declare class CRows<T> implements Iterable<T> {
|
|
|
481
481
|
get length(): number;
|
|
482
482
|
/** --- 通过索引获取一个对象 --- */
|
|
483
483
|
item(index: number): T;
|
|
484
|
-
/** ---
|
|
484
|
+
/** --- 转换为数组对象,获取的是新创建的数组 --- */
|
|
485
485
|
toArray(): Array<Record<string, kebab.DbValue>>;
|
|
486
486
|
[Symbol.iterator](): Iterator<T>;
|
|
487
487
|
}
|
package/sys/mod.js
CHANGED
|
@@ -22,7 +22,7 @@ class Rows {
|
|
|
22
22
|
item(index) {
|
|
23
23
|
return this._items[index];
|
|
24
24
|
}
|
|
25
|
-
/** ---
|
|
25
|
+
/** --- 转换为数组对象,获取的是新创建的数组 --- */
|
|
26
26
|
toArray() {
|
|
27
27
|
const arr = [];
|
|
28
28
|
for (const item of this._items) {
|
|
@@ -544,7 +544,7 @@ class Mod {
|
|
|
544
544
|
return primarys;
|
|
545
545
|
}
|
|
546
546
|
/**
|
|
547
|
-
* --- 将 key val
|
|
547
|
+
* --- 将 key val 组成的数据列表转换为原生对象模式,获取的是新创建的数组 ---
|
|
548
548
|
* @param obj 要转换的 kv 数据列表
|
|
549
549
|
*/
|
|
550
550
|
static toArrayByRecord(obj) {
|
|
@@ -1393,10 +1393,10 @@ class Mod {
|
|
|
1393
1393
|
return this._sql.format(sql, data);
|
|
1394
1394
|
}
|
|
1395
1395
|
/**
|
|
1396
|
-
* ---
|
|
1396
|
+
* --- 获取值对象,获取的是新创建的数组 ---
|
|
1397
1397
|
*/
|
|
1398
1398
|
toArray() {
|
|
1399
|
-
return this._data;
|
|
1399
|
+
return { ...this._data };
|
|
1400
1400
|
}
|
|
1401
1401
|
/**
|
|
1402
1402
|
* --- 获取当前设置要提交的数据 ---
|