Type alias MapChildrenFunction<T>

MapChildrenFunction<T>: ((contents, filename, pathOnly, pathWithFilename) => string | Buffer | Promise<string | Buffer>)

Mapper function signature for [[mapChildren]] (sync).

Type Parameters

  • T

Type declaration

    • (contents, filename, pathOnly, pathWithFilename): string | Buffer | Promise<string | Buffer>
    • Parameters

      • contents: T

        returned value of [[readFile]]. Varies depending on readOptions

      • filename: string

        file name including extension (not including full path)

      • pathOnly: string

        path not including file name

      • pathWithFilename: string

        full path, including file name

      Returns string | Buffer | Promise<string | Buffer>

Returns

the value to pass to [[writeFile]], or a [[Promise]] resolving to the value to pass to [[writeFile]].

Generated using TypeDoc