@automapper/core
TypeScript icon, indicating that this package has built-in type declarations

8.8.1 • Public • Published

@automapper/core

This is the core package that will handle mapping configurations and mapping operations.

Installation

npm i @automapper/core

or with yarn

yarn add @automapper/core

Usage

@automapper/core exposes createMapper() method to create a Mapper object with a accompany MappingStrategy (read more about Strategies)

createMapper accepts a CreateMapperOptions object with the following shape:

export interface CreateMapperOptions {
    strategyInitializer: MappingStrategyInitializer<MetadataIdentifier>;
    errorHandler?: ErrorHandler;
    namingConventions?: NamingConventionInput;
}

Read more about usage on documentation site

Strategies

A given Mapper is accompanied by a Strategy by providing strategyInitializer when using createMapper().

A Strategy will be responsible for:

  • Discover metadata (eg: classes uses @AutoMap() decorator to discover the metadata of the properties on the Classes)
  • Retrieve metadata: how the metadata should be retrieved from the discovery phase (eg: classes discovers and stores the metadata to Reflect, retrieve metadata simply gets them from Reflect)
  • Apply metadata: how the metadata is applied to the Model

@automapper provides the following official strategies:

  • @automapper/classes: Work with TS/ES6 classes.
  • @automapper/pojos: Work with Interfaces/Types along with POJOs. In projects that do not make use of Class, pojos can be used instead.
  • @automapper/mikro: Work together with TS/ES6 classes along with MikroORM
  • @automapper/sequelize: Work together with TS/ES6 classes along with Sequelize

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
8.8.144,305latest
8.5.0-beta.00beta

Version History

VersionDownloads (Last 7 Days)Published
8.8.144,305
8.8.03
8.7.75,089
8.7.635,673
8.7.55
8.7.40
8.7.30
8.7.20
8.7.10
8.7.03,971
8.6.00
8.5.151
8.5.051
8.5.0-beta.00
8.4.10
8.4.00
8.3.72
8.3.7-beta.00
8.3.6155
8.3.50
8.3.40
8.3.345
8.3.20
8.3.10
8.3.00
8.2.40
8.2.30
8.2.20
8.2.10
8.2.00
8.1.00
8.1.0-beta.00
8.0.10
8.0.1-beta.10
8.0.1-beta.00
8.0.00
8.0.0-beta.180
8.0.0-beta.170
8.0.0-beta.160
8.0.0-beta.150
8.0.0-beta.140
8.0.0-beta.130
8.0.0-beta.120
8.0.0-beta.100
8.0.0-beta.90
8.0.0-beta.80
8.0.0-beta.70
8.0.0-beta.60
8.0.0-beta.50
8.0.0-beta.40
8.0.0-beta.30
8.0.0-beta.20
8.0.0-beta.10
8.0.0-beta.00
7.3.14953
7.3.130
7.3.120
7.3.110
7.3.100
7.3.90
7.3.80
7.3.70
7.3.60
7.3.50
7.3.40
7.3.30
7.3.20
7.3.10
7.3.00
7.2.111
7.2.031
7.1.190
7.1.011
7.0.30
7.0.26
7.0.10
7.0.00
6.3.167
6.3.00
6.2.135
6.2.00
6.1.40
6.1.39
6.1.20
6.1.10
6.1.00
6.0.20
6.0.10
6.0.01
5.0.114
5.0.00
4.2.230
4.2.10
4.2.00
4.1.00
4.0.01
3.5.2104
3.5.10
3.5.00
3.4.20
3.4.10
3.4.00
3.3.00
3.2.20
3.2.10
3.2.00
3.1.00
3.0.110
3.0.100
3.0.90
3.0.80
3.0.70
3.0.60
3.0.50
3.0.20
3.0.11
3.0.00
2.2.11
2.2.00
2.1.10
2.1.00
2.0.12
2.0.00
1.2.00
1.1.12
1.1.00
1.0.40
1.0.30
1.0.20
1.0.10
1.0.00
1.0.0-beta.90
1.0.0-beta.80
1.0.0-beta.70
1.0.0-beta.60
1.0.0-beta.50
1.0.0-beta.40
1.0.0-beta.30
1.0.0-beta.20
1.0.0-beta.10

Package Sidebar

Install

npm i @automapper/core

Weekly Downloads

90,719

Version

8.8.1

License

MIT

Unpacked Size

159 kB

Total Files

59

Last publish

Collaborators

  • nartc