{"id":13725832,"url":"https://github.com/developit/jsxobj","last_synced_at":"2025-07-01T13:08:34.463Z","repository":{"id":10715791,"uuid":"66726250","full_name":"developit/jsxobj","owner":"developit","description":"Build JSON using JSX 🌈 (may contain blood magic)","archived":false,"fork":false,"pushed_at":"2022-03-25T01:37:57.000Z","size":12,"stargazers_count":220,"open_issues_count":2,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-20T20:01:16.585Z","etag":null,"topics":["blood-magic","json","jsx"],"latest_commit_sha":null,"homepage":"https://jsfiddle.net/developit/frvec8jb/","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/developit.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-08-27T17:14:59.000Z","updated_at":"2024-12-08T09:19:51.000Z","dependencies_parsed_at":"2022-08-07T06:00:24.172Z","dependency_job_id":null,"html_url":"https://github.com/developit/jsxobj","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/developit/jsxobj","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developit%2Fjsxobj","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developit%2Fjsxobj/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developit%2Fjsxobj/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developit%2Fjsxobj/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/developit","download_url":"https://codeload.github.com/developit/jsxobj/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developit%2Fjsxobj/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262244129,"owners_count":23281000,"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":["blood-magic","json","jsx"],"created_at":"2024-08-03T01:02:36.865Z","updated_at":"2025-07-01T13:08:34.418Z","avatar_url":"https://github.com/developit.png","language":"JavaScript","readme":"# `jsxobj` [![NPM](https://img.shields.io/npm/v/jsxobj.svg?style=flat)](https://www.npmjs.org/package/jsxobj) [![travis-ci](https://travis-ci.org/developit/jsxobj.svg?branch=master)](https://travis-ci.org/developit/jsxobj)\n\nConverts JSX to Objects (JSON) \u003csub\u003eusing blood magic\u003c/sub\u003e.\n\n```sh\nnpm install --save jsxobj\n```\n\n---\n\n### Example\n\n```js\nimport jsxobj from 'jsxobj';\n\n// example of an import'd plugin\nconst CustomPlugin = config =\u003e ({\n\t...config,\n\tname: 'custom-plugin'\n});\n\nconsole.log(\n\t\u003cwebpack target=\"web\" watch\u003e\n\t\t\u003centry path=\"src/index.js\" /\u003e\n\t\t\u003cresolve\u003e\n\t\t\t\u003calias from=\"react\" to=\"preact-compat\" /\u003e\n\t\t\t\u003calias from=\"react-dom\" to=\"preact-compat\" /\u003e\n\t\t\u003c/resolve\u003e\n\t\t\u003cplugins\u003e\n\t\t\t\u003cuglify-js opts={{\n\t\t\t\tcompression: true,\n\t\t\t\tmangle: false\n\t\t\t}} /\u003e\n\t\t\t\u003cCustomPlugin foo=\"bar\" /\u003e\n\t\t\u003c/plugins\u003e\n\t\u003c/webpack\u003e\n);\n```\n\n\nThe above outputs:\n\n```json\n{\n  \"name\": \"webpack\",\n  \"target\": \"web\",\n  \"watch\": true,\n  \"entry\": {\n    \"path\": \"src/index.js\"\n  },\n  \"resolve\": {\n    \"alias\": {\n      \"from\": \"react-dom\",\n      \"to\": \"preact-compat\"\n    }\n  },\n  \"plugins\": {\n    \"uglify-js\": {\n      \"opts\": {\n        \"compression\": true,\n        \"mangle\": false\n      }\n    },\n    \"custom-plugin\": {\n      \"foo\": \"bar\"\n    }\n  }\n}\n```\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevelopit%2Fjsxobj","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevelopit%2Fjsxobj","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevelopit%2Fjsxobj/lists"}