{"id":15686992,"url":"https://github.com/praneshr/transform-parser","last_synced_at":"2025-05-07T14:11:41.343Z","repository":{"id":35082895,"uuid":"203124102","full_name":"praneshr/transform-parser","owner":"praneshr","description":"Converts css transform string to an object and vice versa.","archived":false,"fork":false,"pushed_at":"2023-06-10T08:11:27.000Z","size":358,"stargazers_count":9,"open_issues_count":10,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-07T14:11:31.863Z","etag":null,"topics":["css-transforms","javascript","parser","rollup-js","stringifier","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/praneshr.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-19T07:47:36.000Z","updated_at":"2024-02-15T04:36:28.000Z","dependencies_parsed_at":"2024-09-24T18:43:59.362Z","dependency_job_id":"1a4f0920-3546-4132-8ebd-efeebfe3bec4","html_url":"https://github.com/praneshr/transform-parser","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/praneshr%2Ftransform-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/praneshr%2Ftransform-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/praneshr%2Ftransform-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/praneshr%2Ftransform-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/praneshr","download_url":"https://codeload.github.com/praneshr/transform-parser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252892504,"owners_count":21820648,"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-transforms","javascript","parser","rollup-js","stringifier","typescript"],"created_at":"2024-10-03T17:42:23.226Z","updated_at":"2025-05-07T14:11:41.301Z","avatar_url":"https://github.com/praneshr.png","language":"TypeScript","readme":"# Transform Parser\n\nA small utility which converts css transform string to an object and vice versa.\n\n## Install\n\n```bash\nnpm i transform-parser\n\n# or\n\nyarn add transform-parser\n```\n\nYou can also add`transform-parser` directly to your webpage and use it. The package will be available\nunder `window.transform`.\n\n```html\n\u003cscript src=\"https://unpkg.com/transform-parser\"\u003e\u003c/script\u003e\n```\n\n## Usage\n\nLike React, the default unit is px(pixel). When a number is passed as value, it will be suffixed\nwith `px` and vice verse. Of course, the substitution will be skipped for transforms which requires\nnumeral values, like `scale3d()`.\n\n```javascript\nimport { parse, stringify } from 'transform-parser';\nconst transformString =\n\t'translate3d(10px, 40px, 24px) scale3d(1.1, 1.1, 1.1) perspective(20px)';\n\nparse(transformString);\n// =\u003e {translate3d: [10, 40, 24], scale3d(1.1, 1.1, 1.1), perspective: 20}\n\nconst transformObject = {\n\trotate3d: [1, 2.0, 3.0, '10deg'],\n\tscale3d: [1.1, 1.1, 1.1],\n\tskewX: '30deg',\n};\n\nstringify(transformObject);\n// =\u003e 'rotate3d(1, 2.0, 3.0, 10deg) scale3d(1.1, 1.1, 1.1) skewX(30deg)'\n```\n\n## Local Development\n\n```bash\nyarn install\nyarn build\nyarn test\n```\n\n## License\n\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpraneshr%2Ftransform-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpraneshr%2Ftransform-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpraneshr%2Ftransform-parser/lists"}