Skip to content

Commit d7732c7

Browse files
committed
Replace cool new JS features with lodash because node 8/10
1 parent 29b0739 commit d7732c7

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/plugins/animation.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1+
import _ from 'lodash'
2+
13
export default function() {
24
return function({ addBase, addUtilities, e, theme, variants }) {
35
const keyframesConfig = theme('keyframes')
4-
const keyframesStyles = Object.fromEntries(
5-
Object.entries(keyframesConfig).map(([name, keyframes]) => {
6+
const keyframesStyles = _.fromPairs(
7+
_.toPairs(keyframesConfig).map(([name, keyframes]) => {
68
return [`@keyframes ${name}`, keyframes]
79
})
810
)
911
addBase(keyframesStyles)
1012

1113
const animationConfig = theme('animation')
12-
const utilities = Object.fromEntries(
13-
Object.entries(animationConfig).map(([suffix, animation]) => {
14+
const utilities = _.fromPairs(
15+
_.toPairs(animationConfig).map(([suffix, animation]) => {
1416
return [
1517
`.${e(`animate-${suffix}`)}`,
1618
{

0 commit comments

Comments
 (0)