{"id":29275875,"url":"https://github.com/peterroe/xtj","last_synced_at":"2025-07-05T07:11:27.114Z","repository":{"id":42064272,"uuid":"474245227","full_name":"peterroe/xtj","owner":"peterroe","description":"Convert xml to javascript object","archived":false,"fork":false,"pushed_at":"2023-12-14T20:33:58.000Z","size":84,"stargazers_count":4,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-12-14T21:36:42.695Z","etag":null,"topics":["javascript","xml","xml-parser","xmltojson"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/peterroe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-03-26T04:53:29.000Z","updated_at":"2023-08-19T05:19:36.000Z","dependencies_parsed_at":"2023-01-18T12:00:53.472Z","dependency_job_id":null,"html_url":"https://github.com/peterroe/xtj","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/peterroe/xtj","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterroe%2Fxtj","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterroe%2Fxtj/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterroe%2Fxtj/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterroe%2Fxtj/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peterroe","download_url":"https://codeload.github.com/peterroe/xtj/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterroe%2Fxtj/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263699785,"owners_count":23497963,"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":["javascript","xml","xml-parser","xmltojson"],"created_at":"2025-07-05T07:11:23.551Z","updated_at":"2025-07-05T07:11:27.107Z","avatar_url":"https://github.com/peterroe.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## XTJ\n\nA tiny unit to convert xml to javascript object.\n\n\u003ca href=\"http://img.badgesize.io/https://unpkg.com/xtj?compression=gzip\u0026label=gzip%20size:%20JS\"\u003e\n    \u003cimg src=\"http://img.badgesize.io/https://unpkg.com/xtj?compression=gzip\u0026label=gzip%20size:%20JS\"\u003e\n\u003c/a\u003e\n\n## Features\n\n* `Typescript` support.\n* `ESM` and `UMD` friendly.\n* Tiny size.\n\n## Install\n\n```shell\n$ npm install xtj\n```\n\n## Usage\n\n```ts\nimport XmlToJs from 'xtj'\n\nconst str = `\u003cMyRoot\u003e\u003ctest\u003eSuccess\u003c/test\u003e\u003ctest2\u003e\u003citem\u003eval1\u003c/item\u003e\u003citem\u003eval2\u003c/item\u003e\u003c/test2\u003e\u003c/MyRoot\u003e`\n\nXmlToJs(str)\n\n/* =\u003e\n{\n  \"HTML\": [\n    {\n      \"HEAD\": \"\",\n    },\n    {\n      \"BODY\": [\n        {\n          \"MYROOT\": [\n            {\n              \"TEST\": \"Success\",\n            },\n            {\n              \"TEST2\": [\n                {\n                  \"ITEM\": \"val1\",\n                },\n                {\n                  \"ITEM\": \"val2\",\n                },\n              ],\n            },\n          ],\n        },\n      ],\n    },\n  ],\n}\n*/\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterroe%2Fxtj","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeterroe%2Fxtj","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterroe%2Fxtj/lists"}