迭代字符串拦截器 拦截可迭代字符串-模板的主干 import { iterableStringInterceptor } from "iterable-string-interceptor" ; import { createReadStream } from "fs" ; // double values inside {{}} // {{7}} -> 14 for await ( const chunk of iterableStringInterceptor ( createReadStream ( 'aFile' , { encoding : "utf8" } ) , async * ( expression ) => { yield expression * 2 ; } ) ) { process . stdout . write ( chunk ) ; } import