belgattitude/httpx

View on GitHub
packages/assert/src/array.guards.ts

Summary

Maintainability
A
0 mins
Test Coverage
import type { ArrayNonEmpty } from './array.types';

export const isArrayNonEmpty = <T = unknown>(
  v: unknown
): v is ArrayNonEmpty<T> => {
  return Array.isArray(v) && v.length > 0;
};