Type Alias Chunkify<N, S>

Chunkify<N, S>: IfElse<Or<Complement<IsNonEmptyArray<S>>, And<IfExtends<S["length"], N>, IfExtends<0, N>>>, ChunksFrom<S>, ProcessChunks<N, S>>

Returns an array of chunks of length N from S.

Type Parameters

  • N extends number
  • S extends ReadonlyArray<unknown>