From cd5d9bd5b90d8a9aa563362b0ed78906debf45b3 Mon Sep 17 00:00:00 2001 From: Cameron Fischer Date: Wed, 9 Dec 2020 04:46:35 -0500 Subject: [PATCH] Code cleanup of Linked Lists (#5241) * made private methods limited to module scope * moved private methods to file bottom * changed tests to run comperable array functions in parallel * added comments --- core/modules/utils/linked-list.js | 56 ++++----- .../test/tiddlers/tests/test-linked-list.js | 118 +++++++++++------- 2 files changed, 99 insertions(+), 75 deletions(-) diff --git a/core/modules/utils/linked-list.js b/core/modules/utils/linked-list.js index 50421ab56..b25f0b8fd 100644 --- a/core/modules/utils/linked-list.js +++ b/core/modules/utils/linked-list.js @@ -24,40 +24,19 @@ LinkedList.prototype.clear = function() { LinkedList.prototype.remove = function(value) { if($tw.utils.isArray(value)) { for(var t=0; t