kodadot/nft-gallery

View on GitHub
utils/empty.ts

Summary

Maintainability
A
0 mins
Test Coverage
export function emptyObject<T>(): T {
  return {} as T
}

export function emptyArray<T>(): T[] {
  return [] as T[]
}

export function isEmpty(obj: Record<string, any>): boolean {
  for (const _ in obj) {
    return false
  }
  return true
}