diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/types/List.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/types/List.js b/src/types/List.js index bdeb766..22b9027 100644 --- a/src/types/List.js +++ b/src/types/List.js @@ -47,6 +47,11 @@ List.extend = function (methods) { // Don't add private methods if (name[0] === '_') return obj + // Allow access to original Array methods through a prefix + if (name in Array.prototype) { + obj['$' + name] = Array.prototype[name] + } + // Relay every call to each() obj[name] = function (...attrs) { return this.each(name, ...attrs) |