{"id":16398837,"url":"https://github.com/sauldoescode/simple-msgpack","last_synced_at":"2026-06-23T10:32:36.367Z","repository":{"id":57360476,"uuid":"155542182","full_name":"SaulDoesCode/simple-msgpack","owner":"SaulDoesCode","description":"modern yet tiny msgpack for node and the web. \u003e2.3kb","archived":false,"fork":false,"pushed_at":"2018-11-13T18:09:10.000Z","size":17,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-05T00:02:33.209Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SaulDoesCode.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}},"created_at":"2018-10-31T10:55:10.000Z","updated_at":"2023-03-08T03:30:13.000Z","dependencies_parsed_at":"2022-09-06T22:21:36.337Z","dependency_job_id":null,"html_url":"https://github.com/SaulDoesCode/simple-msgpack","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SaulDoesCode%2Fsimple-msgpack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SaulDoesCode%2Fsimple-msgpack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SaulDoesCode%2Fsimple-msgpack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SaulDoesCode%2Fsimple-msgpack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SaulDoesCode","download_url":"https://codeload.github.com/SaulDoesCode/simple-msgpack/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240298398,"owners_count":19779280,"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":[],"created_at":"2024-10-11T05:14:02.258Z","updated_at":"2026-06-23T10:32:36.305Z","avatar_url":"https://github.com/SaulDoesCode.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## msgpack for all\n\n[![Build Status](https://travis-ci.org/SaulDoesCode/simple-msgpack.svg?branch=master)](https://travis-ci.org/SaulDoesCode/simple-msgpack)\n\n``simple-msgpack`` is an adaptation from [ygeo/msgpack.js](https://github.com/ygoe/msgpack.js)\nthis version is ES7+ and will not work in older browsers.\n\n#### install the lastest\n```html\n\u003cscript src=\"https://unpkg.com/simple-msgpack\"\u003e\n```\nor just download msgpack.min.js from the repo\n\n### Weight Currently\n\nraw: ``13.9kb``  \nminified: ``5.76kb``  \nminified + gzip: ~``2.2kb``  \n\n## API\n\n``.encode`` put in your objects, arrays, or what ever else JSON would have accepted\n\n``.decode`` deserialize raw Uint8Arrays straight into what they were before they were encoded\n\n```js\nconst person = {\n  name: 'Bob Guy',\n  languages: ['javascript', 'golang'],\n  born: new Date(Date.parse('1 April 1997'))\n}\n\n\nconst raw = msgpack.encode(person)\n\nconst decodedPerson = msgpack.decode(raw)\n\nif (\n  decodedPerson.name === person.name \u0026\u0026\n  +decodedPerson.born === +person.born\n) {\n  console.log('all is well that decodes well!')\n}\n```\n\n---\n\n#### tip\n\nif you need to decode a msgpack string, like, say from localStorage for example,\nthen do this:\n```js\nconst data = localStorage\n  .getItem('msgpack-stored-as-number-string')\n\nconst out = msgpack.decode(\n  Uint8Array.from(\n    data\n      .split(',')\n      .map(i =\u003e parseInt(i, 10))\n  )\n)\n\nif (out.rightAsRain) {\n  console.log('good!')\n}\n```\n\n---\n\n## LICENSE is MIT\n\nOriginal creator is Yves github.com/ygoe.  \nThis is an adaptation/simplification of\nhis original project.   \n\nThis version, like his, is MIT so do what you will with it.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsauldoescode%2Fsimple-msgpack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsauldoescode%2Fsimple-msgpack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsauldoescode%2Fsimple-msgpack/lists"}