{"id":16641815,"url":"https://github.com/samthor/tiny-stable-stringify","last_synced_at":"2025-05-07T12:43:28.374Z","repository":{"id":249361162,"uuid":"831244563","full_name":"samthor/tiny-stable-stringify","owner":"samthor","description":"Sorted version of JSON.stringify","archived":false,"fork":false,"pushed_at":"2024-07-20T07:41:08.000Z","size":19,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-31T10:11:18.159Z","etag":null,"topics":["determenistic","hash","json","sort","stable","stringify"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/tiny-stable-stringify","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/samthor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-20T03:03:16.000Z","updated_at":"2025-02-14T04:13:19.000Z","dependencies_parsed_at":"2024-07-20T08:56:23.691Z","dependency_job_id":null,"html_url":"https://github.com/samthor/tiny-stable-stringify","commit_stats":null,"previous_names":["samthor/tiny-stable-stringify"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samthor%2Ftiny-stable-stringify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samthor%2Ftiny-stable-stringify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samthor%2Ftiny-stable-stringify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samthor%2Ftiny-stable-stringify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samthor","download_url":"https://codeload.github.com/samthor/tiny-stable-stringify/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252880439,"owners_count":21818993,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["determenistic","hash","json","sort","stable","stringify"],"created_at":"2024-10-12T07:47:59.221Z","updated_at":"2025-05-07T12:43:28.346Z","avatar_url":"https://github.com/samthor.png","language":"TypeScript","readme":"Sorted version of `JSON.stringify()` so you can get a consistent hash from stringified data.\nZero dependencies, ~450 bytes uncompressed.\n\nVersus the leading brand:\n\n💨 30% faster\n\n🗜️ 98% smaller (20.2kb with deps vs 0.45k and no deps)\n\n## Usage\n\nInstall with your favorite package manager.\nThe API is the same as `JSON.stringify`, and the library mostly wraps that.\n\n```js\nimport { stringify } from 'tiny-stable-stringify';\n\nconst obj = { z: 1, a: 2 };\n\nconsole.info(stringify(obj));\n\n// output is: {\"a\":2,\"z\":1}\n```\n\nSupports nested objects, sorting all keys consistently.\n\nHandles the upcoming [raw JSON](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/rawJSON) feature, but just returns these unchanged with no sorting applied.\n\n## Notes\n\nThis package doesn't support custom sorting because we (ab)use JS' record type which [puts integers first](https://darrinholst.com/blog/2021/09/25/object-keys/).\nBut you don't care, you just want the keys to be sorted.\n\n## Requirements\n\nI'm sure this is very upsetting, but this library requires a JS engine that supports `WeakMap`, `Object.keys`, `Array.isArray`, and `JSON.stringify`.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamthor%2Ftiny-stable-stringify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamthor%2Ftiny-stable-stringify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamthor%2Ftiny-stable-stringify/lists"}