Darkhogg/polyethylene

View on GitHub
docs/polyethylene.chunkingpredicate.md

Summary

Maintainability
Test Coverage
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [polyethylene](./polyethylene.md) &gt; [ChunkingPredicate](./polyethylene.chunkingpredicate.md)

## ChunkingPredicate type

A function that receives an element (`elem`<!-- -->) of the iteration and the first and last element of a chunk, and returns a boolean value representing whether `elem` should be added to the current chunk (if `true`<!-- -->) or be the start of a new chunk (if `false`<!-- -->)

<b>Signature:</b>

```typescript
export declare type ChunkingPredicate<T> = (elem: T, lastElem: T, firstElem: T) => boolean;
```