From d7732c70fc219c650e7be98937bf0dd043689be7 Mon Sep 17 00:00:00 2001 From: Adam Wathan Date: Fri, 24 Jul 2020 12:15:28 -0400 Subject: [PATCH] Replace cool new JS features with lodash because node 8/10 --- src/plugins/animation.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/plugins/animation.js b/src/plugins/animation.js index 49b9f7d26..50ad186d2 100644 --- a/src/plugins/animation.js +++ b/src/plugins/animation.js @@ -1,16 +1,18 @@ +import _ from 'lodash' + export default function() { return function({ addBase, addUtilities, e, theme, variants }) { const keyframesConfig = theme('keyframes') - const keyframesStyles = Object.fromEntries( - Object.entries(keyframesConfig).map(([name, keyframes]) => { + const keyframesStyles = _.fromPairs( + _.toPairs(keyframesConfig).map(([name, keyframes]) => { return [`@keyframes ${name}`, keyframes] }) ) addBase(keyframesStyles) const animationConfig = theme('animation') - const utilities = Object.fromEntries( - Object.entries(animationConfig).map(([suffix, animation]) => { + const utilities = _.fromPairs( + _.toPairs(animationConfig).map(([suffix, animation]) => { return [ `.${e(`animate-${suffix}`)}`, {