aboutsummaryrefslogtreecommitdiffstats
path: root/src/types
diff options
context:
space:
mode:
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)
})
}