Documentation Index
Fetch the complete documentation index at: https://mintlify.com/visible/cruel/llms.txt
Use this file to discover all available pages before exploring further.
cruel.stream.cut()
Cuts a stream mid-transfer at a specific rate.The function to wrap
Stream cut rate (0-1). Default is 0.1 (10%)
T - Function that throws CruelError("stream cut mid-transfer") after execution
Example
cruel.stream.pause()
Adds a pause/delay during stream processing.The function to wrap
Pause duration in milliseconds, or range [min, max]
T - Function with added pause after execution
Example
cruel.stream.corrupt()
Corrupts string data by replacing a random character with �.The function to wrap (must return a string)
Corruption rate (0-1). Default is 0.1 (10%)
T - Function that may corrupt the returned string
Example
cruel.stream.truncate()
Truncates string data at a random point.The function to wrap (must return a string)
Truncation rate (0-1). Default is 0.1 (10%)
T - Function that may truncate the returned string (cuts at 0-80% of length)
Example
cruel.stream.reorder()
Reorders string data by swapping halves.The function to wrap (must return a string)
Reorder rate (0-1). Default is 0.1 (10%)
T - Function that may reorder the returned string by swapping first and second half
Example
cruel.stream.duplicate()
Duplicates a portion of the string data.The function to wrap (must return a string)
Duplication rate (0-1). Default is 0.1 (10%)
T - Function that may duplicate a portion (25-50%) of the string and append it
Example
cruel.stream.dropChunks()
Drops a chunk of data from the middle of the string.The function to wrap (must return a string)
Drop rate (0-1). Default is 0.1 (10%)
T - Function that may drop a chunk (20-40%) from the middle of the string
Example
cruel.stream.corruptChunks()
Alias forcruel.stream.corrupt().
The function to wrap (must return a string)
Corruption rate (0-1)
T - Function that may corrupt chunks
Example
cruel.stream.slow()
Slows down stream with high pauses.The function to wrap
T - Function with slow stream behavior
Behavior: Applies pause of [1000, 5000]ms
Example
cruel.stream.flaky()
Combines stream cuts and pauses for flaky streaming.The function to wrap
T - Function with flaky stream behavior
Behavior:
- 10% chance of stream cut
- Random pause [100, 1000]ms