object-simple-keymapper

0.0.0 • Public • Published

object-simple-keymapper

Very basic and dumb library to copy/modify keys from one object to the other.

Installation

$ npm install object-simple-keymapper

Usage

var a = {x:10, y:20, z:30};
var b = {};
KeyMapper.performMapping(a, b, {
  only: ["x","y"],
  remap: {
    y: "z"
  }
});

// b would now have x and z properties
console.log(b.x); // 10
console.log(b.z); // 30

Readme

Keywords

Package Sidebar

Install

npm i object-simple-keymapper

Weekly Downloads

1

Version

0.0.0

License

WTFPL

Last publish

Collaborators

  • ssscripting