Skip to content

Commit

Permalink
Fix transform example
Browse files Browse the repository at this point in the history
  • Loading branch information
vazgabriel committed Jul 20, 2022
1 parent d9c3637 commit 5d4f2b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1704,7 +1704,7 @@ const Strings = z
To transform data after parsing, use the `transform` method.

```ts
const stringToNumber = z.string().transform((val) => myString.length);
const stringToNumber = z.string().transform((val) => val.length);
stringToNumber.parse("string"); // => 6
```

Expand Down

0 comments on commit 5d4f2b0

Please sign in to comment.