-
-
Save MichalZalecki/ae4596f3f6820b34668d36cc35f3e929 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const schema = { | |
firstName: "first_name", | |
cardNumber: "card.number", | |
}; | |
const mapper = mappet(schema); | |
const source = { | |
first_name: "Michal", | |
last_name: "Zalecki", | |
card: { | |
number: "5555-5555-5555-4444", | |
}, | |
}; | |
const result = mapper(source); | |
// { | |
// firstName: "Michal", | |
// cardNumber: "5555-5555-5555-4444", | |
// } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment