diff --git a/dist/wait-for-element-transition.js b/dist/wait-for-element-transition.js index 345c614..04aef3e 100644 --- a/dist/wait-for-element-transition.js +++ b/dist/wait-for-element-transition.js @@ -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 */ /** @@ -21,7 +21,7 @@ const getCssPropUnitMap = (v) => { } return { num, - unit + unit, }; }; /** @@ -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(); }); }; @@ -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); @@ -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); diff --git a/package-lock.json b/package-lock.json index 00cafec..2cd53d0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "wait-for-element-transition", - "version": "3.0.0", + "version": "3.1.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 80e49ab..15fe853 100644 --- a/package.json +++ b/package.json @@ -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",