llrt icon indicating copy to clipboard operation
llrt copied to clipboard

Support for `format` part of `node:util`

Open dreamorosi opened this issue 11 months ago • 2 comments

[!Note] We have removed usage of this API on our side since it was used only once, however I still think it'd be helpful to have this regardless of Powertools.


In Powertools for AWS Lambda (TypeScript) we use the format function from the node:util module (Node.js docs here) as part of the Logger module.

According to both tests and the API docs of LLRT the module doesn't seem to be supported.

On our side we use it to print certain warnings instead of using template literals so that the values are escaped safely.

The spec for the format module seems easy enough, so it'd be great if it could be added to LLRT.

dreamorosi avatar Mar 25 '24 15:03 dreamorosi

I will add this next, thank you for the report !

fredbonin avatar Mar 26 '24 13:03 fredbonin

I have updated the OP to reflect that we have removed our usage of this API so it's no longer a blocker.

I still think it's a low hanging fruit so it could be added regardless though.

dreamorosi avatar Mar 26 '24 15:03 dreamorosi