automapper-ts-learning

0.0.1 • Public • Published

Build Status

AutoMapperJS

For personal learning and practice. This is a lib which ignore properties or mapping.
中文文档

inspired by https://github.com/loedeman/AutoMapper.

start

npm install
npm run test

simple

    var objA = { prop1: 'From A', prop2: 'From A too' };
    let expectedResult = { testprop1: 'From A', prop2: 'From A too' };

    AutoMapper.createMap('a', 'b')
        .forMember('testprop1', (opts: IMemberConfigurationOptions) => opts.mapFrom('prop1'));
    var objB = AutoMapper.map('a', 'b', objA); 
    // objB = { testprop1: 'prop1', prop2: 'prop2' }

Readme

Keywords

none

Package Sidebar

Install

npm i automapper-ts-learning

Weekly Downloads

0

Version

0.0.1

License

MIT

Unpacked Size

116 kB

Total Files

17

Last publish

Collaborators

  • sparkxxxxxx