From e55e35e0227e83a9e0181e697c7cadab099f1602 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Sun, 4 Apr 2021 19:36:23 +0300 Subject: [PATCH] experimenting... Signed-off-by: Alex A. Naanou --- Array.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Array.js b/Array.js index c0ff669..9524b18 100644 --- a/Array.js +++ b/Array.js @@ -396,6 +396,14 @@ object.Mixin('ArrayProtoMixin', 'soft', { -place : i - j }) }, + /*/ XXX EXPERIMENTAL... + // ...if this is successful then merge this with .sortAs(..) + sort: function(cmp){ + return (arguments.length == 0 || typeof(cmp) == 'function') ? + object.parentCall(ArrayProtoMixin.data.sort, this, ...arguments) + : this.sortAs(...arguments) }, + //*/ + // Same as .sortAs(..) but will not change indexes of items not in other... // // Example: