diff options
| author | netop://ウィビ <paul@webb.page> | 2026-04-11 14:45:40 -0700 |
|---|---|---|
| committer | netop://ウィビ <paul@webb.page> | 2026-04-11 14:45:40 -0700 |
| commit | 1aa441fb05917ad75aede548ba3b84fbf36caf64 (patch) | |
| tree | 17b5255575b3858071a8be65cf5930ae434ec68c /README.md | |
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..5133419 --- /dev/null +++ b/README.md @@ -0,0 +1,58 @@ +# @netopwibby/order-object + +Ever get annoyed when your `Object` keys aren't in alphabetical order? No? Just me? + + + +## Installation + +```sh +# deno +deno add jsr:@netopwibby/order-object + +# node +npx jsr add @netopwibby/order-object +``` + + + +## Usage + +```ts +// deno +import { orderObject } from "jsr:@netopwibby/order-object"; + +// node +import { orderObject } from "@netopwibby/order-object"; + +console.log(orderObject({ zebra: "yay", 1: "neo", horse: "neigh" })); +// returns { "1": "neo", horse: "neigh", zebra: "yay" } +``` + + + +### Running Tests + +```sh +# lint all TypeScript files +deno lint + +# type-check file +deno check mod.ts +deno check test.ts + +# run the tests in `test.ts` +deno test +``` + + + +## License + +MIT + + + +## Prior Art + +- [@webb/order-object](https://github.com/NetOpWibby/order-object/tree/node.js): I made this when Node.js was my best friend. Now Deno is my best friend. |
