{"id":29028253,"url":"https://github.com/jozanza/jsonify-css","last_synced_at":"2026-05-10T03:05:32.121Z","repository":{"id":57285746,"uuid":"82718727","full_name":"jozanza/jsonify-css","owner":"jozanza","description":"parses a css string into a convenient json structure","archived":false,"fork":false,"pushed_at":"2017-03-01T23:07:31.000Z","size":44,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-28T01:18:58.381Z","etag":null,"topics":["css","json","parser"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/jozanza.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":"2017-02-21T19:30:53.000Z","updated_at":"2017-02-22T14:03:38.000Z","dependencies_parsed_at":"2022-09-04T18:53:27.533Z","dependency_job_id":null,"html_url":"https://github.com/jozanza/jsonify-css","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jozanza/jsonify-css","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jozanza%2Fjsonify-css","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jozanza%2Fjsonify-css/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jozanza%2Fjsonify-css/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jozanza%2Fjsonify-css/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jozanza","download_url":"https://codeload.github.com/jozanza/jsonify-css/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jozanza%2Fjsonify-css/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262018767,"owners_count":23245622,"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","parser"],"created_at":"2025-06-26T07:06:09.810Z","updated_at":"2026-05-10T03:05:27.080Z","avatar_url":"https://github.com/jozanza.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jsonify-css\n\n[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency status][david-dm-image]][david-dm-url] [![Dev Dependency status][david-dm-dev-image]][david-dm-dev-url] [![Coverage Status][coveralls-image]][coveralls-url]\n\n[npm-url]:https://npmjs.org/package/jsonify-css\n[downloads-image]:http://img.shields.io/npm/dm/jsonify-css.svg\n[npm-image]:http://img.shields.io/npm/v/jsonify-css.svg\n[travis-url]:https://travis-ci.org/jozanza/jsonify-css\n[travis-image]:http://img.shields.io/travis/jozanza/jsonify-css/master.svg\n[david-dm-url]:https://david-dm.org/jozanza/jsonify-css\n[david-dm-image]:https://img.shields.io/david/jozanza/jsonify-css.svg\n[david-dm-dev-url]:https://david-dm.org/jozanza/jsonify-css#info=devDependencies\n[david-dm-dev-image]:https://img.shields.io/david/dev/jozanza/jsonify-css.svg\n[coveralls-image]:https://coveralls.io/repos/github/jozanza/jsonify-css/badge.svg?branch=master\n[coveralls-url]:https://coveralls.io/github/jozanza/jsonify-css?branch=master\n\n## Installation\n\n`$ yarn add jsonify-css`\n\n## Usage\n\n```js\n// 1. Require the module\nconst jsonify = require('jsonify-css')\n\n// 2. Pass it options\nconst toJSON = jsonify({\n  root: './' // helps inline local url(...)'s as data-uri's\n});\n\n// 3. Parse some css text\nconst json = toJSON(`\n  @charset 'UTF8'\n  .foo { width: 480px; }\n  .bar { width: 320px; color: red; }\n  @media(max-width: 480px) {\n    .foo { max-width: 100%; }\n  }\n  @keyframes fade-in {\n    0%, 50%: { opacity: 0 }\n    to: { opacity: 1 }\n  }\n  @font-face {\n    font-family: 'Open Sans';\n    font-style: normal;\n    font-weight: 400;\n    src: url('./fonts/open-sans.woff');\n  }\n`);\n\n/* outputs the following:\n{\n  charset: [{\n    '@charset': 'UTF-8'\n  }],\n  rules: [{\n    '.foo': { width: '480px' }\n  }, {\n    '.bar': { width: '320px', color: 'red' }\n  }],\n  media: [{\n    '@media(max-width: 480px)': {\n      '.foo': { 'max-width': '100%' }\n    }\n  }],\n  keyframes: [\n    ['fade-in', {\n      '0%,50%': { opacity: '0' },\n      to: { opacity: '1' }\n    }]\n  ],\n  fontFace: [{\n    fontFamily: \"'Open Sans'\",\n    fontStyle: 'normal',\n    fontWeight: '400',\n    src: \"url(data:application/x-font-woff;charset=utf-8;base64,...)\"\n  }]\n} */\n```\n\n## License\n\n[MIT License](http://opensource.org/licenses/MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjozanza%2Fjsonify-css","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjozanza%2Fjsonify-css","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjozanza%2Fjsonify-css/lists"}