Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@ladjs/pick-original

ladjs378MIT2.0.0

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

database, db, deep, deepPluck, doc, document, fields, fields, filter, json, keys, lodash, mongo, mongodb, mongoose, obj, object, omit, original, original, pick, pick, pluck, pluck, plugin, props, recursive, recursively, schema, schematic, security, select, select, sensitive, to, toJSON, toObject, transform, transformer, undefined

readme

@ladjs/pick-original

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

#