aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/optional
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2019-11-01 13:37:24 +0100
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2019-11-01 13:37:24 +0100
commit2827a27531c661726d204d6da9d17c6f72d8e404 (patch)
treea4180b1f462685cce0c314be16511a630d222b05 /src/modules/optional
parent0748382e9859c31253d93b0c258487da362bcade (diff)
downloadsvg.js-2827a27531c661726d204d6da9d17c6f72d8e404.tar.gz
svg.js-2827a27531c661726d204d6da9d17c6f72d8e404.zip
Updated dependencies to newest version, new linter fixed stuff
Diffstat (limited to 'src/modules/optional')
-rw-r--r--src/modules/optional/css.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/modules/optional/css.js b/src/modules/optional/css.js
index 2c97f3e..0caf551 100644
--- a/src/modules/optional/css.js
+++ b/src/modules/optional/css.js
@@ -4,7 +4,7 @@ import { registerMethods } from '../../utils/methods.js'
// Dynamic style generator
export function css (style, val) {
- let ret = {}
+ const ret = {}
if (arguments.length === 0) {
// get full style as object
this.node.style.cssText.split(/\s*;\s*/)
@@ -12,7 +12,7 @@ export function css (style, val) {
return !!el.length
})
.forEach(function (el) {
- let t = el.split(/\s*:\s*/)
+ const t = el.split(/\s*:\s*/)
ret[t[0]] = t[1]
})
return ret
@@ -21,8 +21,8 @@ export function css (style, val) {
if (arguments.length < 2) {
// get style properties in the array
if (Array.isArray(style)) {
- for (let name of style) {
- let cased = camelCase(name)
+ for (const name of style) {
+ const cased = camelCase(name)
ret[cased] = this.node.style[cased]
}
return ret
@@ -35,7 +35,7 @@ export function css (style, val) {
// set styles in object
if (typeof style === 'object') {
- for (let name in style) {
+ for (const name in style) {
// set empty string if null/undefined/'' was given
this.node.style[camelCase(name)]
= (style[name] == null || isBlank.test(style[name])) ? '' : style[name]