Skip to content

Support for optional data formatting based on the serialization strategy #82

@BerciTheBeast

Description

@BerciTheBeast

I propose the addition of optional formatting of values based on the serialization strategy that was used.

Example:
In model:

@prop(...)
public firstName: string;

@prop({
...
    serializable: ['short', 'full'],
    //some formatting logic based on serialization
})
public lastName: string;

Usage:

user.serialize('short'); // {firstName: 'John', lastName: 'S.'}
user.serialize('full'); // {firstName: 'John', lastName: 'Smith'}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions