From eb12a115268671ad324aa437d91c170e5843f4bb Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sun, 12 Jan 2025 18:56:56 -0400 Subject: cacheable-object: remove 900,000 functions --- src/listing-spec.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/listing-spec.js') diff --git a/src/listing-spec.js b/src/listing-spec.js index bfea397c..749f009a 100644 --- a/src/listing-spec.js +++ b/src/listing-spec.js @@ -238,6 +238,27 @@ listingSpec.push({ groupUnderOther: true, }); +// Dunkass mock. Listings should be Things! In the fuuuuture! +class Listing { + static properties = {}; + + constructor() { + Object.assign(this, this.constructor.properties); + } + + static hasPropertyDescriptor(key) { + return Object.hasOwn(this.properties, key); + } +} + +for (const [index, listing] of listingSpec.entries()) { + class ListingSubclass extends Listing { + static properties = listing; + } + + listingSpec.splice(index, 1, new ListingSubclass); +} + { const errors = []; -- cgit 1.3.0-6-gf8a5