1.0.0 • Published 4 years ago

paix v1.0.0

Weekly downloads
5
License
ISC
Repository
github
Last release
4 years ago

paix 🤝

a utility to map objects props with handy config!

Installation ⚙️

npm install paix
or
yarn add paix

Then...

import { paix } from 'paix';

const source_object = { FirstName: "Jhon", LastName: "Doe", Ignored: true };
const replacement = { FirstName: 'first_name', LastName: 'last_name' };
const modified_object = paix(source_object, replacement);

console.log(modified_object);
// { Ignored: true, first_name: 'Jhon', last_name: 'Doe' };