# automapper

> Automapper clone to js world, used with nodejs

Latest version **1.0.0** (published 2018-01-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install automapper
pnpm add automapper
yarn add automapper
bun add automapper
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2018-01-07 |
| First published | 2018-01-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Geeky |
| Maintainers | mustafamagdy |
| Keywords | automapper, automapping, mapping |

## Links

- npm: https://www.npmjs.com/package/automapper
- Repository: https://github.com/mustafamagdy/automapper-node
- Homepage: https://github.com/mustafamagdy/automapper-node#readme
- Issues: https://github.com/mustafamagdy/automapper-node/issues
- npm.io page: https://npm.io/package/automapper

## Recent versions

- 1.0.0 (latest) — 2018-01-07

## README

# Automapper clone for NodeJs
 # License goes to 
    http://johnkalberer.com/?p=47
 
 
 # Usage
 
 1- Require mapper module
 
    const mapper = require('automapper');

 2- Define mapping 
 
     mapper.createMap("body", "user")
           .forMember("userName", function () { this.mapFrom("username"); });

  3- Using mapper
  
    //could be actual body from req object
    var body = {
        username: 'ahmed'
    };

    var user = {
      userName: null
    };

    mapper.map("body", "user", body, user);
    
    now user.userName has the value 'ahmed'

---
_Source: https://npm.io/package/automapper · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
