CAF icon indicating copy to clipboard operation
CAF copied to clipboard

Allow introspection of CAF-wrapped generators

Open aguynamedben opened this issue 4 years ago • 0 comments

Add 2 properties to functions that are CAF-wrapped generators:

  • cafFn.isCAF - true. So the user can detect they're dealing with a function that was produced by CAF.
  • cafFn.generatorName - string. The name of the original generator function. "anonymous" if the original generator was an anonymous generator.

See the tests added in this diff for examples.

aguynamedben avatar Jun 17 '21 07:06 aguynamedben