text.js 349 B

123456789101112
  1. // src/helper/streaming/text.ts
  2. import { TEXT_PLAIN } from "../../context.js";
  3. import { stream } from "./index.js";
  4. var streamText = (c, cb, onError) => {
  5. c.header("Content-Type", TEXT_PLAIN);
  6. c.header("X-Content-Type-Options", "nosniff");
  7. c.header("Transfer-Encoding", "chunked");
  8. return stream(c, cb, onError);
  9. };
  10. export {
  11. streamText
  12. };