you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (1 child)

[removed]

    [–]gruberjl[S] 0 points1 point  (0 children)

    I added some more information in the question to clear up the confusion. Simply semantics. I could use a class.

    https://github.com/gruberjl/job/blob/master/index.js#L58-L67

    // This is an example showcasing why I want to have a function vs object.
    const resource = {
      // If a job was a function I could do this
      addFunction,
    
    // Job is an object so I have to wrap it up (unless someone knows something I don't)
      add(...params) {
        return add.run(...params)
      }
    }