code: function definePipe(pipeDef) {
      return {
          name: pipeDef.name,
          factory: pipeDef.factory,
          pure: pipeDef.pure !== false,
          onDestroy: pipeDef.type.prototype.ngOnDestroy || null
      };
  }
docs: Create a pipe definition object.
  
  # Example
  ```
  class MyPipe implements PipeTransform {
  // Generated by Angular Template Compiler
  static ngPipeDef = definePipe({
  ...
  });
  }
  ```
  @param pipeDef Pipe definition generated by the compiler