Parse a valid css keyframe string into a Keyframe Object for the Web Animations API.
var keyframe = require('keyframe-parser')
var animation = require('nanoanimation')
var move = animation(keyframe`@keyframes move {
from {
top: 0px;
},
to {
top: 100px;
}
}`, 1000)
move(document.getElementById('elem'), () => console.log('done'))
A single function is exported and is a tagged template literal. Pass in a string for a css keyframe animation definition, and it will return a Keyframe Object to be used with the Web Animation API.