Skip to content

BlockSuite API Documentation / @blocksuite/blocks / insertPositionToIndex

Function: insertPositionToIndex()

insertPositionToIndex(position, arr)

insertPositionToIndex<T>(position, arr): number

Type parameters

T extends Object

Parameters

position: InsertToPosition

arr: T[]

Returns

number

Source

packages/blocks/src/database-block/utils/insert.ts:3

insertPositionToIndex(position, arr, key)

insertPositionToIndex<T>(position, arr, key): number

Type parameters

T

Parameters

position: InsertToPosition

arr: T[]

key

Returns

number

Source

packages/blocks/src/database-block/utils/insert.ts:8