awslabs / llrt

LLRT (Low Latency Runtime) is an experimental, lightweight JavaScript runtime designed to address the growing demand for fast and efficient Serverless applications.
Apache License 2.0
7.74k stars 342 forks source link

Add commas after ignoring undefined values in the middle of objects #315

Closed calavera closed 3 months ago

calavera commented 3 months ago

Issue # (if available)

Fixes https://github.com/awslabs/llrt/issues/314

Description of changes

This change keeps track of indexes and object sizes to decide if we need to add a comma after ignoring an undefined value or not.

I'm not sure if there is any easier way to implement this, I'm open to alternatives.

Checklist

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

richarddavison commented 3 months ago

Thanks for this, this can be can be simplified tho.

Closing in favor of https://github.com/awslabs/llrt/pull/317