Skip to content

Releases: russmatney/super-object-mapper

updated object-mapper dep

12 Aug 04:25
Compare
Choose a tag to compare

closure to select mapper

15 May 16:33
Compare
Choose a tag to compare

no breaking changes.

0.4.0: Merge pull request #5 from russmatney/tighter-map-object-api

11 May 18:07
Compare
Choose a tag to compare

Moves api from mapObject(map, mapper, object) to mapObject(object, {map: map, mapper: mapper})

Data types and conversions

20 Dec 07:15
Compare
Choose a tag to compare

First iteration for setting explicit data-types and tranformers. Exposes SuperOM.Type, provides conversion to string or objectId via .string() or .objectId().

refactor -> cleaner tests, more readable implementation

20 Dec 05:10
Compare
Choose a tag to compare
Merge pull request #2 from russmatney/refactor-tests-and-lib

Refactor tests and lib

Array and null handling

20 Dec 04:19
Compare
Choose a tag to compare

Handing an Array of objects to mapObject will apply the specified mapper to every object in that array, and return the mapped array.

Unless {clean: true} is specified in the options, all falsy values are stripped from the mappedObject EXCEPT those that are explicitly set on the original object. the node-object-mapper used under the hood likes to set everything to null, which could be a problem if you don't want to wipe all the non-specified data away with a partial update to a database.

Initial Release

20 Dec 01:37
Compare
Choose a tag to compare

Instances share mappers, .addMapper(mapper, mapperName) and .mapObject(mapName, mapperName, object) implemented and tested.