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

Commit

Permalink
chore: update readme (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
KATT authored Sep 30, 2023
1 parent 6fde3d2 commit 048f306
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
7 changes: 2 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@


# [0.5.0](https://github.com/KATT/tupleson/compare/0.4.0...0.5.0) (2023-09-30)


### Features

* `createTypeson` -> `createTson` ([#6](https://github.com/KATT/tupleson/issues/6)) ([3613716](https://github.com/KATT/tupleson/commit/3613716eedb541c2592d14f76130a7295d340d5c))
- `createTypeson` -> `createTson` ([#6](https://github.com/KATT/tupleson/issues/6)) ([3613716](https://github.com/KATT/tupleson/commit/3613716eedb541c2592d14f76130a7295d340d5c))

# [0.4.0](https://github.com/KATT/tupleson/compare/0.3.1...0.4.0) (2023-09-30)

Expand Down Expand Up @@ -36,4 +33,4 @@
### Features

- initial version ([#1](https://github.com/KATT/tupleson/issues/1)) ([ccce25b](https://github.com/KATT/tupleson/commit/ccce25b6a039cf2e5c1a774c1ab022f0946ca8d5))
- initialized repo ✨ ([c9e92a4](https://github.com/KATT/tupleson/commit/c9e92a42c97a8bc1ee3a9214f65626425c8598e3))
- initialized repo ✨ ([c9e92a4](https://github.com/KATT/tupleson/commit/c9e92a42c97a8bc1ee3a9214f65626425c8598e3))
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,19 @@ const tson = createTson({
],
});

const result = tson.stringify(
const myObj = {
foo: "bar",
set: new Set([1, 2, 3]),
} as const;

const str = tson.stringify(
{
foo: "bar",
set: new Set([1, 2, 3]),
},
2,
);
console.log(result);
console.log(str);
// ->
// {
// "json": {
Expand All @@ -88,6 +93,8 @@ console.log(result);
// "nonce": "__tson"
// }

const obj = tson.parse(str);

// ✨ Retains type integrity
type Obj = typeof obj;
// ^?
Expand Down

0 comments on commit 048f306

Please sign in to comment.