Zerowidth CleanerAll measured guides

CLAUDE WATERMARK REMOVER · PRACTICAL TEST

Why can repeat return an empty string for an invalid cleaned count?

Our invalid count converts to NaN and X.repeat returns empty without throwing. A fractional 2.9 repeats twice; minus one throws RangeError. The marked three becomes XXX after cleanup, but successful repetition alone does not validate a count.

Tested October 15, 2026 · v24.19.0 · 4 measured runs

Open the Claude text cleaner · Full measured data

Code-point comparison for Marked count

Measured inputs and outputs

These are locally constructed test strings, not evidence that Claude inserts these characters. We executed the saved homepage script snapshot with a minimal DOM harness and compared exact strings. The invisible-checkbox state and dash mode appear in each row. The observations below test this page's specific question. Destination observations run independently on the exact input and cleaned strings in the recorded Node runtime. We make no detector-score or statistical-watermark removal claim.

Before and after observations; full code points and strings are in the JSON download.
Fixture and modeInput string and code pointsOutput and cleaner statusObserved before / after
Marked count
direct string / keep / invisible true
"​3"
U+200B U+0033
"3"
Removed 1 invisible character
{"numberLabel":"NaN","finite":false,"integer":false,"result":"","errorName":null}
{"numberLabel":"3","finite":true,"integer":true,"result":"XXX","errorName":null}
Fraction count
direct string / keep / invisible true
"2.9"
U+0032 U+002E U+0039
"2.9"
No selected invisible characters found
{"numberLabel":"2.9","finite":true,"integer":false,"result":"XX","errorName":null}
{"numberLabel":"2.9","finite":true,"integer":false,"result":"XX","errorName":null}
Negative count
direct string / keep / invisible true
"-1"
U+002D U+0031
"-1"
No selected invisible characters found
{"numberLabel":"-1","finite":true,"integer":true,"result":null,"errorName":"RangeError"}
{"numberLabel":"-1","finite":true,"integer":true,"result":null,"errorName":"RangeError"}
Invalid count
direct string / keep / invisible true
"bad"
U+0062 U+0061 U+0064
"bad"
No selected invisible characters found
{"numberLabel":"NaN","finite":false,"integer":false,"result":"","errorName":null}
{"numberLabel":"NaN","finite":false,"integer":false,"result":"","errorName":null}

No exception does not mean the count passed validation

The marked count converts to NaN before removal and produces an empty repeat result. After cleanup it converts to three and produces XXX. The invalid bad control remains NaN and also produces an empty string without an exception. The fractional control is finite but not an integer; its 2.9 value produces two X characters. The negative control is an integer but throws RangeError. We store finiteness and integer flags independently from the returned text and exception name. Together these fields expose three different questions: what conversion produced, what repeat accepted, and whether that count fits an intended application requirement. None of those questions is answered by the cleaner’s removal status.

This test uses small bounded examples rather than allocation limits

Our observer repeats a single ASCII X and deliberately chooses only tiny finite counts or NaN. It does not attempt giant allocations, Infinity, implementation string-length limits or memory exhaustion. The earlier padding guide asks how an existing source fills a fixed field; this page asks how a separate numeric argument controls repetition. The argument is explicitly passed through Number first, so the numeric label is part of the record rather than hidden inside a method call. We do not test every coercible JavaScript object or count spelling. Catching the negative case preserves the evidence file; it does not silently replace an application error with an acceptable empty result.

Define accepted counts before allocating output

When a destination requires a finite nonnegative integer within a specified bound, check those properties explicitly and retain the reason for rejection. An empty result can mean zero requested output or an invalid input coerced through NaN in these cases; inspect the count instead of reverse-engineering validation from text length. The fraction control also shows why finiteness alone cannot enforce integer input. Set practical size limits according to the actual application, which this experiment does not choose or benchmark. Downloading the harness allows these four local observations to be repeated without creating large strings. Cleanup can restore the marked three while leaving the separate count-validation policy entirely to its caller.

Reproduce this test

Save reproduce.cjs and tested-app.js in the same folder. Run the command below with Node.js. The harness prints its runtime, script SHA-256 and every measured row. Compare those rows with the original record. Using a newer script or runtime creates a new experiment; retain the version information with your rerun.

node reproduce.cjs

Reference and next check

ECMAScript string operations provides the relevant primary definition. The table and fixture analysis are original measurements. For broader inspection, use our Unicode inspector. Read the scope distinction before interpreting cleanup as a watermark result.