@foundit/micro-animations
Advanced tools
Comparing version 0.1.0 to 0.1.1
# @foundit/micro-animations | ||
## 0.1.1 | ||
### Patch Changes | ||
- aa6a230: Make sure target propertiese are unique in array. | ||
## 0.1.0 | ||
@@ -4,0 +10,0 @@ |
@@ -46,8 +46,9 @@ "use strict"; | ||
const transformEndArr = Array.isArray(transformEnd) ? transformEnd : [transformEnd]; | ||
const targetProperties = transformEndArr.reduce( | ||
(acc, transformObj) => { | ||
return [...acc, ...Object.keys(transformObj)]; | ||
}, | ||
[] | ||
); | ||
const targetProperties = [ | ||
...new Set( | ||
transformEndArr.reduce((acc, transformObj) => { | ||
return [...acc, ...Object.keys(transformObj)]; | ||
}, []) | ||
) | ||
]; | ||
debuglog("targetProps", targetProperties); | ||
@@ -54,0 +55,0 @@ return new Promise((resolve) => { |
13
index.ts
@@ -92,8 +92,9 @@ import { Property } from 'csstype' | ||
// Extract the properties to animate from the transformEnd object(s) | ||
const targetProperties = transformEndArr.reduce( | ||
(acc, transformObj: Keyframe) => { | ||
return [...acc, ...Object.keys(transformObj)] as (keyof Keyframe)[] | ||
}, | ||
[] as (keyof Keyframe)[] | ||
) | ||
const targetProperties = [ | ||
...new Set( | ||
transformEndArr.reduce((acc, transformObj: Keyframe) => { | ||
return [...acc, ...Object.keys(transformObj)] as (keyof Keyframe)[] | ||
}, [] as (keyof Keyframe)[]) | ||
), | ||
] | ||
debuglog('targetProps', targetProperties) | ||
@@ -100,0 +101,0 @@ |
{ | ||
"name": "@foundit/micro-animations", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
33879
458