MCPcopy
hub / github.com/splitbee/react-notion / getListNumber

Function getListNumber

src/utils.ts:35–44  ·  view source on GitHub ↗
(blockId: string, blockMap: BlockMapType)

Source from the content-addressed store, hash-verified

33};
34
35export const getListNumber = (blockId: string, blockMap: BlockMapType) => {
36 const groups = groupBlockContent(blockMap);
37 const group = groups.find(g => g.includes(blockId));
38
39 if (!group) {
40 return;
41 }
42
43 return group.indexOf(blockId) + 1;
44};
45
46export const defaultMapImageUrl: MapImageUrl = (image = "", block) => {
47 const url = new URL(

Callers 1

renderComponentFunction · 0.90

Calls 1

groupBlockContentFunction · 0.85

Tested by

no test coverage detected