Skip to content
This repository was archived by the owner on Jul 20, 2021. It is now read-only.

Latest commit

 

History

History
22 lines (15 loc) · 424 Bytes

File metadata and controls

22 lines (15 loc) · 424 Bytes

Chunk

Take a chunk of the input and return it.

Configuration

interface IChunkConfig {
  start?: string | number;
  size?: string | number;
}

Example

const chunkMapperDefault = Mappers.chunk(); // Chunk: start:0|size:4

const chunkMapper7to11 = Mappers.chunk({ start: 7 }); // Chunk: start:7|size:4

const chunkMapper10to22 = Mappers.chunk({ start: 10, size: 12 }); // Chunk: start:10|size:12