Skip to content

Commit 47fefc9

Browse files
committed
MV: calling them Attributes to avoid confusion.
1 parent 56ff5f7 commit 47fefc9

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

zod-plugin/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
### v1.1.0
66

7-
- Added low-level helpers `pack()` and `unpack()` to handle inheritable metadata that withstands refinements:
7+
- Added low-level helpers `pack()` and `unpack()` to handle inheritable attributes that withstands refinements:
88
- `schema.brand()` is a shorthand for `pack(schema, { brand })`;
99
- `getBrand()` is a shorthand for `unpack(schema).brand`.
1010

zod-plugin/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@ schema.meta(); // { examples: ["test", "another"] }
3535
## Helpers
3636

3737
- `getBrand()` — retrieves the brand from the schema that was set by its `.brand()` method;
38-
- `pack()` — returns a cloned schema having inheritable metadata assigned (such as brand);
39-
- `unpack()` — retrieves the metadata from the schema that was set by `pack()` helper.
38+
- `pack()` — returns a cloned schema having inheritable attributes assigned (such as brand);
39+
- `unpack()` — retrieves the attributes from the schema that was set by `pack()` helper.

zod-plugin/packer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ interface $Packer<B extends object> extends z.core.$ZodCheck {
1616

1717
/**
1818
* @public
19-
* @desc Attaches an inheritable metadata to the schema (withstands refinements).
19+
* @desc Attaches an inheritable attributes to the schema (withstands refinements).
2020
*/
2121
export const pack = <T extends z.ZodType, B extends object>(
2222
subject: T,
@@ -36,7 +36,7 @@ export const pack = <T extends z.ZodType, B extends object>(
3636

3737
/**
3838
* @public
39-
* @desc Retrieves the metadata attached to the schema by pack() method.
39+
* @desc Retrieves the attributes attached to the schema by pack() method.
4040
*/
4141
export const unpack = <T extends z.core.$ZodType>(
4242
subject: T,

0 commit comments

Comments
 (0)