{"id":28509849,"url":"https://github.com/choojs/nanoanimation","last_synced_at":"2025-07-03T01:31:17.453Z","repository":{"id":57307843,"uuid":"101811324","full_name":"choojs/nanoanimation","owner":"choojs","description":"👨‍🎨 - Safety wrapper around the Web Animation API","archived":false,"fork":false,"pushed_at":"2025-02-16T11:15:34.000Z","size":63,"stargazers_count":72,"open_issues_count":1,"forks_count":7,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-08T22:39:42.590Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/choojs.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":"2017-08-29T22:12:05.000Z","updated_at":"2025-02-16T11:15:47.000Z","dependencies_parsed_at":"2022-09-17T22:02:11.724Z","dependency_job_id":null,"html_url":"https://github.com/choojs/nanoanimation","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/choojs/nanoanimation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/choojs%2Fnanoanimation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/choojs%2Fnanoanimation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/choojs%2Fnanoanimation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/choojs%2Fnanoanimation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/choojs","download_url":"https://codeload.github.com/choojs/nanoanimation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/choojs%2Fnanoanimation/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263243614,"owners_count":23436336,"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":[],"created_at":"2025-06-08T22:37:30.637Z","updated_at":"2025-07-03T01:31:17.434Z","avatar_url":"https://github.com/choojs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nanoanimation\n[![npm version][2]][3] [![build status][4]][5]\n[![downloads][8]][9] [![js-standard-style][10]][11]\n\nSafety wrapper around the Web Animations API. Allows animations to safely be\ndefined in Node, and browsers that don't support the Web Animation API. Default\nbehavior is to do nothing.\n\n## Usage\n```js\nvar animation = require('nanoanimation')\nvar css = require('sheetify')\nvar html = require('bel')\n\ncss('tachyons')\n\nvar el = html`\n  \u003cdiv class=\"bg-red h5 w5\" onclick=${() =\u003e move.play()}\u003e\n    Hello planet\n  \u003c/div\u003e\n`\n\nvar keyFrames = [\n  { transform: 'translateY(0%)' },\n  { transform: 'translateY(100%)' }\n]\n\nvar timingProperties = {\n  duration: 1000,\n  fill: 'forwards'\n}\n\nvar animate = animation(keyFrames, timingProperties)\nvar move = animate(el, function () {\n  console.log('event ended')\n})\ndocument.body.appendChild(el)\n```\n\n## API\n### `animate = animation(keyFrames, timingProperties)`\nCreate a new animation.\n\n### `WebAnimation = animate(el, [done])`\nApply an animation to an element, calls `done` when finished. Returns the\nnativate Web Animation object.\n\n## See Also\n- [Using the Web Animations API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Animations_API/Using_the_Web_Animations_API)\n\n## License\n[MIT](https://tldrlegal.com/license/mit-license)\n\n[0]: https://img.shields.io/badge/stability-experimental-orange.svg?style=flat-square\n[1]: https://nodejs.org/api/documentation.html#documentation_stability_index\n[2]: https://img.shields.io/npm/v/nanoanimation.svg?style=flat-square\n[3]: https://npmjs.org/package/nanoanimation\n[4]: https://img.shields.io/travis/choojs/nanoanimation/master.svg?style=flat-square\n[5]: https://travis-ci.org/choojs/nanoanimation\n[6]: https://img.shields.io/codecov/c/github/choojs/nanoanimation/master.svg?style=flat-square\n[7]: https://codecov.io/github/choojs/nanoanimation\n[8]: http://img.shields.io/npm/dm/nanoanimation.svg?style=flat-square\n[9]: https://npmjs.org/package/nanoanimation\n[10]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\n[11]: https://github.com/feross/standard\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchoojs%2Fnanoanimation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchoojs%2Fnanoanimation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchoojs%2Fnanoanimation/lists"}