import { memo } from 'react' import { Code, Container, Heading, Text, VStack, Box, useColorModeValue, Image, Button, Flex, Spacer, } from '@chakra-ui/react' import { CodeSnippet } from './CodeSnippet' import { ColorModeSwitcher } from './ColorModeSwitcher' import LogoDark from '../logos/logo-dark.svg' type BadgeProps = { src: string alt: string href?: string } let Badge = ({ src, alt, href }: BadgeProps) => { let style = { marginRight: '5px', display: 'inline-block' } let image = return href ? {image} : image } let Badges = () => ( ) let Logo = () => ( // both light and dark modes are a dark background, so no need for color value // ) // let green = 'linear(to-r, #39b54a, #8dc63f)' // let blue = 'linear(to-r, #27aae1, #1c75bc)' // let blue = 'linear(to-r, #1c75bc, #27aae1)' let gray = 'linear(to-b, gray.900, gray.700)' let lightGray = 'linear(225deg, gray.700, gray.900)' let Summary = ({ dispatch }) => ( A collection of Functional Utilities. Resistance is{' '} futile. Mostly, these are generic utilities that could conceivably be part of a library like lodash/fp, but for some reason or other are not. Designed to work with any other utility library. lodash{' '} and ramda work great. lodash/fp works best. {`$ npm i futil # or $ yarn add futil`} This package requires lodash/fp, so make sure it is available in your app. {`// Load entire library import F from 'futil' import * as F from 'futil' // Load specific methods import { x, y, z } from 'futil'`} {`F.compactObject({ a: 1, b: null, c: 3}) // => { a: 1, c: 3 } F.flattenObject({ a: 1, b: { x: 10, y: 11 }, c: 3}) // => { a: 1, 'b.x': 10, 'b.y': 11, c: 3 } F.unflattenObject({ a: 1, 'b.x': 10, 'b.y': 11, c: 3 }) // => { a: 1, b: { x: 10, y: 11 }, c: 3}`} ) let BrowserCoverage = () => ( Sauce Test Status ) export default memo(({ dispatch }: { dispatch: (any) => {} }) => ( <> Support Why futil? Designed to work with any other utility library. lodash{' '} and ramda work great. lodash/fp works best. Brought to you by the SmartProcure/GovSpend team ))