0.1.38 • Published 10 months ago

@x-oasis/recycler v0.1.38

Weekly downloads
-
License
ISC
Repository
-
Last release
10 months ago

@x-oasis/recycler

Installation

$ npm i @x-oasis/recycler

How to use

import IntegerBufferSet from '@x-oasis/recycler'

How to run test

$ pnpm test

Philosophy

Basically, give an List index then get a placed position(recycler list index); In order to reuse more elements, object ref should be considered..

For Example, remove / delete / add an element, they all cause index change of original source data. but

API

updateIndices

updateIndices(props: {
  /**
   * index in range should not be recycled
   */
  safeRange: {
    startIndex: number;
    endIndex: number;
  };
  startIndex: number;
  maxCount: number;
  step?: number;
  
  /**
   * return boolean value, true means the current processing index should be counted in.
   */
  onProcess?: (type?: string, index?: number) => boolean
})
0.1.36

10 months ago

0.1.37

10 months ago

0.1.38

10 months ago

0.1.35

1 year ago

0.1.34

2 years ago

0.1.33

2 years ago

0.1.32

2 years ago

0.1.31

2 years ago

0.1.30

2 years ago

0.1.29

2 years ago

0.1.28

2 years ago

0.1.27

2 years ago

0.1.26

2 years ago

0.1.24

2 years ago

0.1.23

2 years ago

0.1.21

2 years ago

0.1.20

2 years ago