Wondering what’s next for npm?Check out our public roadmap! »

    @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

    Install

    npm i @ladjs/pick-original

    DownloadsWeekly Downloads

    6

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    8.05 kB

    Total Files

    12

    Last publish

    Collaborators

    • avatar
    • avatar
    • avatar