import cryptoRandomString from 'crypto-random-string'; // NOTE: `crypto` module is not available in RN so this can't be in client export const generatePassword = (length: number) => cryptoRandomString({ length, type: 'ascii-printable' }); export type NonEmptyArray = [T, ...T[]]; export const isNonEmpty = (input: T[]): input is NonEmptyArray => input.length > 0; export const isNonEmptyObject = (input: object) => Object.keys(input).length > 0;