Skip to content

Change up/down so that they are defined as functions instead of sections #3

@edeustace

Description

@edeustace

Intead of having up be everything above '//Down' - have the enduser write a function 'up' and optionally 'down'. then wrap the script like so below.

The benefit of this is that the script writer can then re-use some logic in the script for both actions.

if(!direction || direction != "up" || direction != "down"){
  throw "You need to specify a direction";
}

direction === "up" ? up() : if(down) down();

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions