UNPKG

keystone

Version:

Web Application Framework and Admin GUI / Content Management System built on Express.js and Mongoose

11 lines (9 loc) 231 B
var _ = require('lodash'); module.exports = function transform (doc, ret) { if (doc._populatedRelationships) { _.forEach(doc._populatedRelationships, function (on, key) { if (!on) return; ret[key] = doc[key]; }); } };