UNPKG

bagpipes

Version:

Less code, more flow. Let's dance!

19 lines (13 loc) 375 B
'use strict'; var _ = require('lodash'); var debug = require('debug')('pipes'); module.exports = function create() { return function omit(context, cb) { var input = context.input; if (Array.isArray(context.output)) { cb(null, _.map(context.output, _.partialRight(_.omit, input))); } else { cb(null, _.omit(context.output, input)); } } };