Azure / azure-sdk-for-js

This repository is for active development of the Azure SDK for JavaScript (NodeJS & Browser). For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/javascript/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-js.
MIT License
2.05k stars 1.19k forks source link

[logger] eliminate expensive regex #31061

Open xirzec opened 1 week ago

xirzec commented 1 week ago

This was flagged by an automated tool as a bad code pattern:

https://github.com/Azure/azure-sdk-for-js/blob/6b40ae55606dc7ed493b7440d45684c4489b05aa/sdk/core/logger/src/debug.ts#L100

and

https://github.com/Azure/azure-sdk-for-js/blob/6b40ae55606dc7ed493b7440d45684c4489b05aa/sdk/core/logger/src/debug.ts#L102

Perhaps we can clean this code up or consider taking a dependency on debug directly now that we aren't trying to support IE11...

github-actions[bot] commented 1 week ago

@deyaaeldeen @jeremymeng @joheredi @maorleger @mpodwysocki @timovv @xirzec

github-actions[bot] commented 1 week ago

Thank you for your feedback. Tagging and routing to the team member best able to assist.