Skip to content

Commit

Permalink
Fix transform example (#1276)
Browse files Browse the repository at this point in the history
  • Loading branch information
vazgabriel committed Jul 22, 2022
1 parent d9c3637 commit 4ade47a
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 4ade47a

Please sign in to comment.