key-remap
Remaps a values from an object to specified keys
/** * Remaps a values from an object to specified keys * * @param * @param * * @return */ { ... }
Install
npm i -S key-remap
Usage
var assert = ;var keyRemap = ;var is = ; var keymap = nameKey: 'name' ageKey: 'age' missingKey: 'missing'; var obj = name: 'Trevor' age: 28; remapped = ; ; // trueassert; // true; // true