docs: function transform(input, process = () => undefined, finish = () => undefined) {
    if (isStream(input)) {
      return transformRaw(input, {
        async transform(value, controller) {
          try {
            const result = await process(value);
            if (result !== undefined) controller.enqueue(result);
          } catch(e) {
            controller.error(e);
          }
        },
        async flush(controller) {
          try {
            const result = await finish();
            if (result !== undefined) controller.enqueue(result);
          } catch(e) {
            controller.error(e);
          }
        }
      });
    }
    const result1 = process(input);
    const result2 = finish();
    if (result1 !== undefined && result2 !== undefined) return concat([result1, result2]);
    return result1 !== undefined ? result1 : result2;
  }