@k3000/store 0.2.1 → 0.3.1

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/architect.mjs CHANGED
@@ -441,7 +441,7 @@ export class Entities extends Array {
441
441
 
442
442
  #assign(position, item) {
443
443
 
444
- Object.assign(new this.#classify(position, this.#index, this.#lengthSet, this.#positionSet),
444
+ return Object.assign(new this.#classify(position, this.#index, this.#lengthSet, this.#positionSet),
445
445
  this.#classify.create(item))
446
446
  }
447
447
 
@@ -452,7 +452,7 @@ export class Entities extends Array {
452
452
  this.#storage.needSave = true
453
453
  }
454
454
 
455
- for (const item of items) {
455
+ return items.map(item => {
456
456
 
457
457
  let position
458
458
 
@@ -469,10 +469,8 @@ export class Entities extends Array {
469
469
 
470
470
  this.#record.push(position)
471
471
 
472
- this.#assign(position, item)
473
- }
474
-
475
- return items.length
472
+ return this.#assign(position, item)
473
+ })
476
474
  }
477
475
 
478
476
  pop() {
@@ -498,7 +496,7 @@ export class Entities extends Array {
498
496
  this.#storage.needSave = true
499
497
  }
500
498
 
501
- for (const item of items) {
499
+ return items.map(item => {
502
500
 
503
501
  let position
504
502
 
@@ -515,10 +513,8 @@ export class Entities extends Array {
515
513
 
516
514
  this.#record.unshift(position)
517
515
 
518
- this.#assign(position, item)
519
- }
520
-
521
- return items.length
516
+ return this.#assign(position, item)
517
+ })
522
518
  }
523
519
 
524
520
  shift() {
@@ -1405,4 +1401,4 @@ export const cloneObjByKey = (obj, ...keys) => {
1405
1401
  }
1406
1402
 
1407
1403
  return result
1408
- }
1404
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@k3000/store",
3
- "version": "0.2.1",
3
+ "version": "0.3.1",
4
4
  "description": "storage",
5
5
  "main": "generator.mjs",
6
6
  "scripts": {
package/test/1/index CHANGED
Binary file
package/test/2/index CHANGED
Binary file
package/test/3/index CHANGED
Binary file
package/test/4/index CHANGED
Binary file
package/test/5/index CHANGED
Binary file
package/test/6/index CHANGED
Binary file
package/test/7/index CHANGED
Binary file