Skip to content

remove empty arrays/strings #14

Description

@nickersd

I understand that the dynamoDB does not allow empty strings or arrays of zero length. Perhaps this lib could remove elements that are empty/null/zero length.

The reason that I'm asking is that I'm using typescript, one of the the beauties of which is interfaces. So my interface requires an attribute even if empty. So currently I have to either not use an interface, not use this lib, or roll up my sleeves and pitch in:)

..although, there would be no way to unwrap into an object that conformed to the interface so the user would have to know that. I found the following stackoverflow discussion and I'm just using a recursive clean function to remove them for now and it's working great.

remove null attribs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions