Skip to content

Commit 0782c90

Browse files
authored
Merge pull request #175 from msgpack/deno-support
mention to Deno
2 parents 17b1dca + e1a1162 commit 0782c90

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ deepStrictEqual(decode(encoded), object);
6767
- [Distribution](#distribution)
6868
- [NPM / npmjs.com](#npm--npmjscom)
6969
- [CDN / unpkg.com](#cdn--unpkgcom)
70+
- [Deno Support](#deno-support)
7071
- [Maintenance](#maintenance)
7172
- [Testing](#testing)
7273
- [Continuous Integration](#continuous-integration)
@@ -561,6 +562,12 @@ This library is available via CDN:
561562

562563
It loads `MessagePack` module to the global object.
563564

565+
566+
## Deno Support
567+
568+
You can use this module on Deno.
569+
570+
See `example/deno-*.ts` for examples.
564571
## Maintenance
565572

566573
### Testing

example/deno-with-esmsh.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env deno run
2+
/* eslint-disable no-console */
3+
import * as msgpack from "https://esm.sh/@msgpack/msgpack";
4+
5+
console.log(msgpack.decode(msgpack.encode("Hello, world!")));

example/deno-with-unpkg.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env deno run
2+
/* eslint-disable no-console */
3+
import * as msgpack from "https://unpkg.com/@msgpack/msgpack?module";
4+
5+
console.log(msgpack.decode(msgpack.encode("Hello, world!")));

0 commit comments

Comments
 (0)