Skip to content

Why a class? #62

@thany

Description

@thany

The source is written to be a class, and then an export is created, which is just a plain function calling a static function inside that class.

The whole source could be a collection of plain functions, and looking at the export, you could export the main resize function as-is. Currently, you're wrapping it in a function with an otherwise identical signature, which is unneccesary overhead.

In short:

  1. No need for it to be a class
  2. No need for a wrapper export function

This will make for a cleaner source, and smaller package size.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions