@ladjs/pick-original

1.0.0 • Public • Published

@ladjs/pick-original

build status code coverage code style styled with prettier made with lass license npm downloads

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

yarn:

yarn add @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 Website
Nick Baugh http://niftylettuce.com/

License

MIT © Nick Baugh

/@ladjs/pick-original/

    Package Sidebar

    Install

    npm i @ladjs/pick-original

    Weekly Downloads

    12

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    8.05 kB

    Total Files

    12

    Last publish

    Collaborators

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