Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Tags: teq/serialazy

Tags

v3.0.0

Toggle v3.0.0's commit message
* **[BREAKING]** Removed `@Serialize.Type()` and `@Serialize.Custom()…

…` decorators.

  Now all type and property decoration is done by `@Serialize()`.
* **[BREAKING]** `@Serialize()` accepts custom type serializer (`up` & `down`) and options as a single argument.
* **[BREAKING]** Removed `TypeSerializer.discriminate()` (redundant, was never used)
* Add `Serializable`, an abstract base class for serializables
* Async serialization / deserialization (`deflate.resolve` and `inflate.resolve`)
* Serializatio / deserialization to/from a POJO (`as` and `toPojo` options)
* Add projections (`projection` and `fallbackToDefaultProjection` options)
* Add optional `as` parameter to DeflateOptions. It allows to override a type of serializable
  (serialize as a different type)
* Add options for `inflate` / `deflate`, pass them to `up` / `down` functions as second argument
* Both `up` and `down` functions for custom type serializer are now optional

v2.0.2

Toggle v2.0.2's commit message
* Refine class inheritance logic: If class inherits from property-bag…

… serializable => it becomes

  a property-bag serializable. If class inherits from custom type serializable => it becomes
  non-serializable. Fixes #11

v2.0.1

Toggle v2.0.1's commit message
Updated `PropertyBagMetadata.getTypeSerializer()`

`up` & `down` arguments are checked for being null/undefined before applying property serializers.
Fixes #6.

v2.0.0

Toggle v2.0.0's commit message
* Added `@Serialize.Type()` decorator which allows to define custom s…

…erializers for types

* `deflate/inflate` can accept primitives (string, number, boolean and their "boxed" variants, null, undefined)
* [BREAKING] Removed `isSerializable`, `deepMerge` facade functions and `@Serialize.Skip()` decorator.

v1.3.1

Toggle v1.3.1's commit message
* Added `assertSerializable` functions which throws an error if targe…

…t is not serializable class instance

  or serializable class constructor function (TODO: add example to README).
* Previously to be _serializable_ class should have serializers on its own properties (i.e. should have own metadata)
  with no respect to its ancestors. Now class is _serializable_ if it
  either has own serializers or any of its ancestors have serializers.
* Using global symbol to access serializable's metadata.
  This fixes a bug when project dependencies introduce multiple instances of library
  and metadata defined in one verion can't be accessed in another.

v1.3.0

Toggle v1.3.0's commit message
v1.3.0

------

* Added `deepMerge` function which performs a deep (recursive) property
merge from serializable-like source object to serializable destination
object (TODO: add example to README)
* Added `isSerializable` function which allows to check if target is a
serializable class instance or serializable class constructor function
* Added class name to serialization/deserialization error message

v1.2.3

Toggle v1.2.3's commit message
* `Serialize.Custom` decorator now accepts either serializer or seria…

…lizer provider function

v1.2.2

Toggle v1.2.2's commit message
* Fixed a bug with circular module dependencies

v1.2.1

Toggle v1.2.1's commit message
* Added JSON types export

v1.2.0

Toggle v1.2.0's commit message
* Child class inherits serializers from parent

* Added support for `options` in custom serializers
* Added `name` option which allows to map property to a different name
Morty Proxy This is a proxified and sanitized view of the page, visit original site.