{"id":25376792,"url":"https://github.com/terrierscript/css-keyframe-animatable","last_synced_at":"2025-09-12T13:41:49.928Z","repository":{"id":145723945,"uuid":"67514571","full_name":"terrierscript/css-keyframe-animatable","owner":"terrierscript","description":null,"archived":false,"fork":false,"pushed_at":"2016-12-12T23:27:09.000Z","size":13,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-07T04:55:00.428Z","etag":null,"topics":[],"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/terrierscript.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2016-09-06T14:16:07.000Z","updated_at":"2019-03-20T18:18:08.000Z","dependencies_parsed_at":"2023-05-01T01:00:44.997Z","dependency_job_id":null,"html_url":"https://github.com/terrierscript/css-keyframe-animatable","commit_stats":null,"previous_names":["inuscript/css-keyframe-animatable"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/terrierscript/css-keyframe-animatable","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terrierscript%2Fcss-keyframe-animatable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terrierscript%2Fcss-keyframe-animatable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terrierscript%2Fcss-keyframe-animatable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terrierscript%2Fcss-keyframe-animatable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/terrierscript","download_url":"https://codeload.github.com/terrierscript/css-keyframe-animatable/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terrierscript%2Fcss-keyframe-animatable/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274822922,"owners_count":25356615,"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","status":"online","status_checked_at":"2025-09-12T02:00:09.324Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-02-15T04:39:19.215Z","updated_at":"2025-09-12T13:41:49.920Z","avatar_url":"https://github.com/terrierscript.png","language":"JavaScript","readme":"# css-keyframe-to-array\n\nConvert CSS `@keyframes` like object to `Element.animate` compatible array\n\n[![npm](https://img.shields.io/npm/v/css-keyframe-animatable.svg)](https://www.npmjs.com/package/css-keyframe-animatable)\n[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)\n[![Build Status](https://travis-ci.org/inuscript/css-keyframe-animatable.svg?branch=master)](https://travis-ci.org/inuscript/css-keyframe-animatable)\n\n```js\nconst cssKeyframesToArray = require('css-keyframe-to-array')\n\nconst input = {\n  from: { marginTop: '50px' },\n  to: { marginTop: '100px' }\n}\n\ncssKeyframesToArray(input)\n```\n\nOutput\n\n```js\n[\n  { marginTop: '50px', offset: 0 },\n  { marginTop: '100px', offset: 1 }\n]\n```\n\nMore complex example\n\n```js\nconst input = {\n  '0% ': { top: 0, left: 0 },\n  '30%': { top: '50px', animationTimingFunction: 'ease-out' },\n  '68%, 72%': { left: '50px' },\n  '100%': { top: '100px', left: '100%' }\n}\ncssKeyframesToArray(input)\n```\n\n```js\n[\n  { top: 0, left: 0, offset: 0 },\n  { top: '50px', offset: 0.3 , easing: 'ease-out'},\n  { left: '50px', offset: 0.68 },\n  { left: '50px', offset: 0.72 },\n  { top: '100px', left: '100%', offset: 1 }\n]\n```\n- Percentage timing is replace to `offset` (between 0.0 ~ 1.0)\n- Flatten comma separated percentage timing\n- `animationTimingFunction` or `animation-timing-function` is replaced to `easing`\n\n# Related Project\n\n- [keyshond](https://github.com/inuscript/keyshond)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterrierscript%2Fcss-keyframe-animatable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fterrierscript%2Fcss-keyframe-animatable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterrierscript%2Fcss-keyframe-animatable/lists"}