{"id":20767017,"url":"https://github.com/binded/tus-metadata","last_synced_at":"2025-03-11T18:51:26.857Z","repository":{"id":57382389,"uuid":"68402662","full_name":"binded/tus-metadata","owner":"binded","description":"Encode and decode Tus.io Upload-Metatada strings","archived":false,"fork":false,"pushed_at":"2016-09-18T21:50:12.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-01-18T06:28:22.858Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/binded.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":"2016-09-16T17:56:26.000Z","updated_at":"2023-08-06T21:14:05.000Z","dependencies_parsed_at":"2022-09-26T16:50:11.609Z","dependency_job_id":null,"html_url":"https://github.com/binded/tus-metadata","commit_stats":null,"previous_names":["blockai/tus-metadata"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binded%2Ftus-metadata","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binded%2Ftus-metadata/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binded%2Ftus-metadata/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binded%2Ftus-metadata/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/binded","download_url":"https://codeload.github.com/binded/tus-metadata/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243094608,"owners_count":20235531,"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-11-17T11:27:17.830Z","updated_at":"2025-03-11T18:51:26.834Z","avatar_url":"https://github.com/binded.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tus-metadata\n\n[![Build Status](https://travis-ci.org/blockai/tus-metadata.svg?branch=master)](https://travis-ci.org/blockai/tus-metadata)\n\nEncode and decode Tus [Upload-Metatada](http://tus.io/protocols/resumable-upload.html#upload-metadata).\n\n## Install\n\n```bash\nnpm install --save tus-metadata\n```\n\nRequires Node v6+\n\n## Usage\n\nSee [./test](./test) directory for usage examples.\n\n**decode(str)**\n\nAccepts an `Upload-Metadata` encoded string and returns a key/value object.\n\n**encode(obj)**\n\nAccepts an object and returns an `Upload-Metadata` encoded string.\n\n```javascript\nimport { encode, decode } from 'tus-metadata'\n\nconst str = 'filename d29ybGRfZG9taW5hdGlvbl9wbGFuLnBkZg==,mimetype dGV4dC9wbGFpbgo='\n\ndecode(str)\n// =\u003e {filename: 'world_domination_plan.pdf', mimetype: 'text/plain'}\n\nencode(decode(str))\n// =\u003e filename d29ybGRfZG9taW5hdGlvbl9wbGFuLnBkZg==,mimetype dGV4dC9wbGFpbgo=\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinded%2Ftus-metadata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbinded%2Ftus-metadata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinded%2Ftus-metadata/lists"}