Skip to content

Commit

Permalink
Release 3.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark committed Apr 5, 2020
1 parent 45b0e53 commit 9a57b6d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
18 changes: 9 additions & 9 deletions dist/wait-for-element-transition.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/*!
* Wait-for-element-transition v3.0.0
* https://github.com/mkay581/wait-for-element-transition#readme
*
* Copyright (c) 2018 Mark Kennedy
* Licensed under the MIT license
* Wait-for-element-transition v3.1.0
* https://github.com/mkay581/wait-for-element-transition#readme
*
* Copyright (c) 2020 Mark Kennedy
* Licensed under the MIT license
*/

/**
Expand All @@ -21,7 +21,7 @@ const getCssPropUnitMap = (v) => {
}
return {
num,
unit
unit,
};
};
/**
Expand Down Expand Up @@ -49,7 +49,7 @@ function getTransitionDuration(el) {
*/
const getJsPropName = (cssProp) => {
// convert to camelCase
return cssProp.replace(/-([a-z])/g, letter => {
return cssProp.replace(/-([a-z])/g, (letter) => {
return letter[1].toUpperCase();
});
};
Expand All @@ -68,7 +68,7 @@ function getTransitionDuration(el) {
let map;
times.push.apply(times, delay); // account for delay
// calculate highest number of time
times.forEach(value => {
times.forEach((value) => {
value.split(',').forEach((v) => {
v = convertCssTimeValueToMilliseconds(v);
map = getCssPropUnitMap(v);
Expand All @@ -84,7 +84,7 @@ function getTransitionDuration(el) {
*/
function waitForElementTransition(el) {
const duration = getTransitionDuration(el);
return new Promise(resolve => {
return new Promise((resolve) => {
if (duration > 0) {
setTimeout(() => {
resolve(el);
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wait-for-element-transition",
"version": "3.0.0",
"version": "3.1.0",
"description": "Easily wait for an element to complete it's transition using native vanilla JavaScript",
"main": "dist/wait-for-element-transition.js",
"types": "dist/wait-for-element-transition.d.ts",
Expand Down

0 comments on commit 9a57b6d

Please sign in to comment.