From 9eba51258001692bcc1e6c9283848815b9579e5c Mon Sep 17 00:00:00 2001 From: rhpidfyre Date: Thu, 6 Mar 2025 17:59:10 -0500 Subject: [PATCH] auto sort collections --- src/rt/rfwfs/main.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/rt/rfwfs/main.ts b/src/rt/rfwfs/main.ts index 9846e60..5f6dbde 100644 --- a/src/rt/rfwfs/main.ts +++ b/src/rt/rfwfs/main.ts @@ -87,10 +87,11 @@ rfwfs.new_entry = function(name, permissions, timestamp, inner) { rfwfs.new_collection = function(collection: T[]): EntryCollection { const collection_trait = { collection: collection } as EntryCollection - collection_trait.sort = function() { return sort(this) } - collection_trait.push = function(entry) { return push(this, entry) } - collection_trait.pop = function(file_name) { return pop(this, file_name) } + collection_trait.sort = function() { return sort(this) } + collection_trait.push = function(entry) { return push(this, entry) } collection_trait.find = function(file_name) { return find(this, file_name) } + collection_trait.pop = function(file_name) { return pop(this, file_name) } + collection_trait.sort() return collection_trait }