@ladjs/pick-original

2.0.0 • Public • Published

build status code style styled with prettier made with lass license

Transform an Object that was transformed to return only the original properties recursively picked if they are not undefined.

Table of Contents

Install

npm:

npm install @ladjs/pick-original

Usage

const pickOriginal = require('@ladjs/pick-original');

function createObj(doc) {
  doc.id = Date.now().toString();
  return doc;
}

const original = { foo: 'bar' };

const transformed = pickOriginal(createObj(original), original);

console.log(transformed);

// { foo: 'bar' }

Contributors

Name
Titanism

License

MIT © Titanism

Package Sidebar

Install

npm i @ladjs/pick-original

Weekly Downloads

37

Version

2.0.0

License

MIT

Unpacked Size

7.82 kB

Total Files

16

Last publish

Collaborators

  • titanism
  • shadowgate15
  • niftylettuce
  • shaunwarman
  • spence-s