0.1.38 • Published 2 years ago

@x-oasis/recycler v0.1.38

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years 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

2 years ago

0.1.37

2 years ago

0.1.38

2 years ago

0.1.35

2 years ago

0.1.34

3 years ago

0.1.33

3 years ago

0.1.32

3 years ago

0.1.31

3 years ago

0.1.30

3 years ago

0.1.29

3 years ago

0.1.28

3 years ago

0.1.27

3 years ago

0.1.26

3 years ago

0.1.24

3 years ago

0.1.23

3 years ago

0.1.21

3 years ago

0.1.20

3 years ago