summaryrefslogtreecommitdiffstats
path: root/src/types
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-11-10 20:24:57 +0100
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-11-12 12:59:25 +0100
commitc108c060152add00cac72a4911f6e998ffb4eb83 (patch)
tree93767c7fabb7aaaabe2cd6c75bf15b9dd9480781 /src/types
parent7a5ae8b897548eef9efbf900b42936f24f911cea (diff)
downloadsvg.js-c108c060152add00cac72a4911f6e998ffb4eb83.tar.gz
svg.js-c108c060152add00cac72a4911f6e998ffb4eb83.zip
change method name, make strings more pleasing to read
Diffstat (limited to 'src/types')
-rw-r--r--src/types/ArrayPolyfill.js12
-rw-r--r--src/types/List.js8
2 files changed, 10 insertions, 10 deletions
diff --git a/src/types/ArrayPolyfill.js b/src/types/ArrayPolyfill.js
index cf95d54..839a970 100644
--- a/src/types/ArrayPolyfill.js
+++ b/src/types/ArrayPolyfill.js
@@ -5,12 +5,12 @@ export const subClassArray = (function () {
return Function('name', 'baseClass', '_constructor', [
'baseClass = baseClass || Array',
'return {',
- '[name]: class extends baseClass {',
- 'constructor (...args) {',
- 'super(...args)',
- '_constructor && _constructor.apply(this, args)',
- '}',
- '}',
+ ' [name]: class extends baseClass {',
+ ' constructor (...args) {',
+ ' super(...args)',
+ ' _constructor && _constructor.apply(this, args)',
+ ' }',
+ ' }',
'}[name]'
].join('\n'))
} catch (e) {
diff --git a/src/types/List.js b/src/types/List.js
index f3c0e1e..193ed05 100644
--- a/src/types/List.js
+++ b/src/types/List.js
@@ -9,12 +9,12 @@ const List = subClassArray('List', Array, function (arr) {
export default List
extend(List, {
- each (cbOrName, ...args) {
- if (typeof cbOrName === 'function') {
- this.forEach((el) => { cbOrName.call(el, el) })
+ each (fnOrMethodName, ...args) {
+ if (typeof fnOrMethodName === 'function') {
+ this.forEach((el) => { fnOrMethodName.call(el, el) })
} else {
this.forEach((el) => {
- el[cbOrName](...args)
+ el[fnOrMethodName](...args)
})
}