{"id":15426302,"url":"https://github.com/richardlitt/inline-style-2-json","last_synced_at":"2026-02-04T07:09:55.152Z","repository":{"id":57274158,"uuid":"43509595","full_name":"RichardLitt/inline-style-2-json","owner":"RichardLitt","description":"Convert CSS inline stlyes to JSON","archived":false,"fork":false,"pushed_at":"2020-05-23T12:07:01.000Z","size":612,"stargazers_count":9,"open_issues_count":3,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-14T20:19:16.165Z","etag":null,"topics":["css","json","stringify"],"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/RichardLitt.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-01T17:13:01.000Z","updated_at":"2025-03-06T17:08:46.000Z","dependencies_parsed_at":"2022-09-17T10:12:57.811Z","dependency_job_id":null,"html_url":"https://github.com/RichardLitt/inline-style-2-json","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RichardLitt%2Finline-style-2-json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RichardLitt%2Finline-style-2-json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RichardLitt%2Finline-style-2-json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RichardLitt%2Finline-style-2-json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RichardLitt","download_url":"https://codeload.github.com/RichardLitt/inline-style-2-json/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251321881,"owners_count":21570814,"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":["css","json","stringify"],"created_at":"2024-10-01T17:55:24.158Z","updated_at":"2026-02-04T07:09:55.125Z","avatar_url":"https://github.com/RichardLitt.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# inline-style-2-json\n\n[![Greenkeeper badge](https://badges.greenkeeper.io/RichardLitt/inline-style-2-json.svg)](https://greenkeeper.io/)\n[![Build Status](https://travis-ci.org/RichardLitt/inline-style-2-json.svg?branch=master)](https://travis-ci.org/RichardLitt/inline-style-2-json)\n\n\u003e Convert CSS inline styles to JSON\n\nThis is a small function that takes the content of a `style` tag (as a string) and outputs an object or a JSON string. This is useful if you are piping HTML through [xml-objects](https://github.com/timhudson/xml-objects) or something similar and you want finer granularity.\n\n## Install\n\n```\n$ npm install --save inline-style-2-json\n```\n\n\n## Usage\n\n```js\nvar inlineStyle2Json = require('inline-style-2-json');\n\ninlineStyle2Json('position:absolute;h-index:9001;');\n//=\u003e \"{ position: 'absolute', 'h-index': '9001'}\"\n\ninlineStyle2Json('position:absolute;h-index:9001;', {stringify: true});\n//=\u003e '{\"position\":\"absolute\",\"h-index\":\"9001\"}'\n```\n\n\n## API\n\n### inlineStyle2Json(input, [options])\n\n#### input\n\nType: `string`\n\nThis should be your inline style string.\n\n#### options\n\n##### stringify\n\nType: `boolean`  \nDefault: `false`\n\nReturn stringified object.\n\n## Contribute\n\nSure! Open an issue, open a PR.\n\n## License\n\n[MIT](license) © 2018 [Richard Littauer](http://burntfen.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frichardlitt%2Finline-style-2-json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frichardlitt%2Finline-style-2-json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frichardlitt%2Finline-style-2-json/lists"}