UNPKG

virtua

Version:

A zero-config, fast and small (~3kB) virtual list (and grid) component for React, Vue, Solid and Svelte.

16 lines (15 loc) 397 B
export const styleToString = (obj) => { return Object.keys(obj).reduce((acc, k) => { const value = obj[k]; if (value == null) { return acc; } return acc + `${k}:${value};`; }, ""); }; export const defaultGetKey = (_data, i) => "_" + i; export function* iterRange([start, end]) { for (let i = start; i <= end; i++) { yield i; } }