Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
cool
Browse files Browse the repository at this point in the history
  • Loading branch information
KATT committed Sep 30, 2023
1 parent 2949648 commit 3d7f6b4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export {
createTson,
createTsonDeserializer,
createTsonDeserialize,
createTsonParser,
createTsonSerialize,
createTsonStringify,
Expand Down
6 changes: 3 additions & 3 deletions src/tson.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ type WalkerFactory = (nonce: TsonNonce) => WalkFn;
type AnyTsonTransformerSerializeDeserialize =
TsonTransformerSerializeDeserialize<any, any>;

export function createTsonDeserializer(opts: TsonOptions): TsonDeserializeFn {
export function createTsonDeserialize(opts: TsonOptions): TsonDeserializeFn {
const typeByKey: Record<string, AnyTsonTransformerSerializeDeserialize> = {};

for (const handler of opts.types) {
Expand Down Expand Up @@ -62,7 +62,7 @@ export function createTsonDeserializer(opts: TsonOptions): TsonDeserializeFn {
}

export function createTsonParser(opts: TsonOptions): TsonParseFn {
const deserializer = createTsonDeserializer(opts);
const deserializer = createTsonDeserialize(opts);

return ((str: string) =>
deserializer(JSON.parse(str) as TsonSerialized)) as TsonParseFn;
Expand Down Expand Up @@ -187,7 +187,7 @@ function mapOrReturn(
}

export const createTson = (opts: TsonOptions) => ({
deserialize: createTsonDeserializer(opts),
deserialize: createTsonDeserialize(opts),
parse: createTsonParser(opts),
serialize: createTsonSerialize(opts),
stringify: createTsonStringify(opts),
Expand Down

0 comments on commit 3d7f6b4

Please sign in to comment.