key-mapping-schema
Library for to converting from one key to another key
Installation
Using npm:
$ npm install --save key-mapping-schema
Examples
; const response = person_id: 0 person_name: 'name' person_age: 100 person_items_count: 100 meta: {} some_data: fname: 1 lname: 2 const schema = person_id: 'userID' person_name: 'userName' person_age: 'personAge' person_items_count: '.toUpper' some_data: self: 'someData' fname: 'fName' lname: 'lName' cursorKey: 'self' );const newResponse = schema;
;KeyMappingSchemamethods = Object;const props = user: 'userName'const schema = user: '.u';const newProps = schema;// newProps.__user__ = 'userName'
See more in the Examples.