UNPKG

@maherunlocker/custom-react-table

Version:

**Custom-react-table** is based on <code>React-Table v7</code>: collection of hooks for **building powerful tables and datagrid experiences**. These hooks are lightweight, composable, and ultra-extensible, but **do not render any markup or styles for you*

15 lines (12 loc) 431 B
// Various functions pulled from the internal react-table utils package - useful // when pulling hooks from the main repo before changing them. export function sum(arr: any[]): number { return arr.reduce((prev, curr) => prev + curr, 0) } export function getFirstDefined(...args: any[]): any { for (let i = 0; i < args.length; i += 1) { if (typeof args[i] !== 'undefined') { return args[i] } } }