Skip to content

Hooks for static methods? #14

@raymondfeng

Description

@raymondfeng

Let's say I have a JavaScript constructor as follows:

  function MyModel() {
  }

  MyModel.create = function(...);

How can I set up pre/post hooks for MyModel.create? The code doesn't seem to support this use case as it assumes the methods are from the prototype.

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