Skip to content

Commit 9a57b6d

Browse files
author
Mark
committed
Release 3.1.0
1 parent 45b0e53 commit 9a57b6d

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

dist/wait-for-element-transition.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/*!
2-
* Wait-for-element-transition v3.0.0
3-
* https://github.com/mkay581/wait-for-element-transition#readme
4-
*
5-
* Copyright (c) 2018 Mark Kennedy
6-
* Licensed under the MIT license
2+
* Wait-for-element-transition v3.1.0
3+
* https://github.com/mkay581/wait-for-element-transition#readme
4+
*
5+
* Copyright (c) 2020 Mark Kennedy
6+
* Licensed under the MIT license
77
*/
88

99
/**
@@ -21,7 +21,7 @@ const getCssPropUnitMap = (v) => {
2121
}
2222
return {
2323
num,
24-
unit
24+
unit,
2525
};
2626
};
2727
/**
@@ -49,7 +49,7 @@ function getTransitionDuration(el) {
4949
*/
5050
const getJsPropName = (cssProp) => {
5151
// convert to camelCase
52-
return cssProp.replace(/-([a-z])/g, letter => {
52+
return cssProp.replace(/-([a-z])/g, (letter) => {
5353
return letter[1].toUpperCase();
5454
});
5555
};
@@ -68,7 +68,7 @@ function getTransitionDuration(el) {
6868
let map;
6969
times.push.apply(times, delay); // account for delay
7070
// calculate highest number of time
71-
times.forEach(value => {
71+
times.forEach((value) => {
7272
value.split(',').forEach((v) => {
7373
v = convertCssTimeValueToMilliseconds(v);
7474
map = getCssPropUnitMap(v);
@@ -84,7 +84,7 @@ function getTransitionDuration(el) {
8484
*/
8585
function waitForElementTransition(el) {
8686
const duration = getTransitionDuration(el);
87-
return new Promise(resolve => {
87+
return new Promise((resolve) => {
8888
if (duration > 0) {
8989
setTimeout(() => {
9090
resolve(el);

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "wait-for-element-transition",
3-
"version": "3.0.0",
3+
"version": "3.1.0",
44
"description": "Easily wait for an element to complete it's transition using native vanilla JavaScript",
55
"main": "dist/wait-for-element-transition.js",
66
"types": "dist/wait-for-element-transition.d.ts",

0 commit comments

Comments
 (0)