Quickly create a object-mode duplex stream
@param {function?} transform(chunk, encoding, done)
@param {function?} flush(done)
@param {boolean} objectMode
@return {DuplexStream}
7053
function through(transform, flush, objectMode) {
  const stream = new TransformStream({objectMode})
  stream._transform = transform || pass
  if (flush) stream._flush = flush
  return stream
}
566007
function (data, noRoam, out) {
        var transform = noRoam ? this._rawTransform : this.transform;
        out = out || [];
        return transform
            ? v2ApplyTransform(out, data, transform)
            : vector.copy(out, data);
    }
1074473
function transform(data, encoding, callback) {
    /* jshint validthis:true */

    // Ignore if killed
    /* istanbul ignore if */
    if (this._swiftTransform.killed) {
        return;
    }

    // Push the task
    this._swiftTransform.queue.push({ data: data, encoding: encoding }, transformDone.bind(this));

    // If we are not saturated, simply call more right away
    if (this._swiftTransform.queue.running() + this._swiftTransform.queue.length() < this._swiftTransform.queue.concurrency) {
        setImmediate(callback);
    // Otherwise store the callback because we will need it later
    } else {
        this._swiftTransform.callback = callback;
    }
}
641655
function BlockDecoder(opts) {
  opts = opts || {};

  var noDecode = !!opts.noDecode;
  stream.Duplex.call(this, {
    allowHalfOpen: true, // For async decompressors.
    readableObjectMode: !noDecode
  });

  this._type = null;
  this._codecs = opts.codecs;
  this._parseHook = opts.parseHook;
  this._tap = new Tap(new Buffer(0));
  this._blockTap = new Tap(new Buffer(0));
  this._syncMarker = null;
  this._readValue = null;
  this._noDecode = noDecode;
  this._queue = new utils.OrderedQueue();
  this._decompress = null; // Decompression function.
  this._index = 0; // Next block index.
  this._needPush = false;
  this._finished = false;

  this.on('finish', function () {
    this._finished = true;
    if (this._needPush) {
      this._read();
    }
  });
}
356234
function transformRaw(input, options) {
  const transformStream = new TransformStream(options);
  pipe(input, transformStream.writable);
  return transformStream.readable;
}
219341
function Courier(opts) {
  stream.Transform.call(this, { objectMode: true });

  this.options = merge(Object.create(Courier.DEFAULTS), opts || {});
}
847501
@Override
    public Object transform( Object input ) {

        // Wrap the input in a map to fool the CompositeSpec to recurse itself.
        Map<String,Object> wrappedMap = new HashMap<>();
        wrappedMap.put(ROOT_KEY, input);
        rootSpec.applyToMap( wrappedMap );
        return input;
    }
588509
function BlockEncoder(schema, opts) {
  opts = opts || {};

  stream.Duplex.call(this, {
    allowHalfOpen: true, // To support async compressors.
    writableObjectMode: true
  });

  var obj, type;
  if (types.Type.isType(schema)) {
    type = schema;
    schema = undefined;
  } else {
    // Keep full schema to be able to write it to the header later.
    obj = files.load(schema);
    type = types.createType(obj);
    schema = JSON.stringify(obj);
  }

  this._schema = schema;
  this._type = type;
  this._writeValue = function (tap, val) {
    try {
      this._type._write(tap, val);
    } catch (err) {
      this.emit('error', err);
    }
  };
  this._blockSize = opts.blockSize || 65536;
  this._tap = new Tap(new Buffer(this._blockSize));
  this._codecs = opts.codecs;
  this._codec = opts.codec || 'null';
  this._compress = null;
  this._omitHeader = opts.omitHeader || false;
  this._blockCount = 0;
  this._syncMarker = opts.syncMarker || new utils.Lcg().nextBuffer(16);
  this._queue = new utils.OrderedQueue();
  this._pending = 0;
  this._finished = false;
  this._needPush = false;

  this.on('finish', function () {
    this._finished = true;
    if (this._blockCount) {
      this._flushChunk();
    }
  });
}
1100714
function _transform(chunk, encoding, cb) {
  if(this.raw) {
    this.emit('data', chunk, encoding);
    return cb();
  }
  /* istanbul ignore if: optional dependency */
  if(this.reader) {
    var reply;
    this.reader.feed(chunk);
    try {
      while((reply = this.reader.get()) !== undefined) {
        if(reply && reply.constructor === Error) {
          this.emit("reply", reply, null);
        }else{
          this.emit("reply", null, reply);
        }
      }
    }catch(err) {
      this.emit("error", err);
    }
  }else{
    //console.dir('decoder: ' + chunk);
    //console.dir('decoder chunk byte: ' + String.fromCharCode(chunk[0]));
    if(chunk.length) {
      var type = this._type(chunk, true);
      if(type === undefined && !this._buffer.length) {
        return this._abort(
          new Error(
            'protocol error, got "'
            + String.fromCharCode(chunk[0]) + '" as reply type byte'));
      }
      this._buffer = Buffer.concat(
        [this._buffer, chunk], this._buffer.length + chunk.length);
      this._offset = 0;
      this._parse(this._buffer);
    }
  }
  cb();
}
1182448
function chainTransform (obj, path = []) {
  return flatmap(Object.keys(obj), function (key) {
    if (key === 'required') {
      // starts array with `true` or `false` and makes the
      // deepest-nested expression first in the array
      return [path.concat(obj[key]).reverse()];
    } else {
      return chainTransform(obj[key], path.concat(key));
    }
  });
}
344848
function transformResponse(transform) {

  assert.ok(transform);
  assert.ok(transform instanceof Function);

  var originalStatus, originalJson, reqClosure;

  return function (req, res, next) {
    originalStatus = res.status;
    originalJson = res.json;
    reqClosure = req;
    res.status = setStatus;
    res.json = sendJson;
    return next();
  }

  function setStatus(status) {
    this.__status = status;
    return this;
  }

  function sendJson(body) {
    this.__body = body;
    var B = new Bundle(transform, reqClosure, this);
    originalStatus.call(this, B.status);
    return originalJson.call(this, B.body);
  }

}
1081344
function transformItem(stream, item) {
    var ret;
    if (isArray(item)) {
        if (isHashArray(item)) {
            ret = transformHashArrayData(stream, item);
        } else {
            ret = transformArrayData(stream, item);
        }
    } else {
        ret = transformHashData(stream, item);
    }
    return ret;
}
922018
function Stream( options ) {
	var args = arguments,
		opts = {},
		err;
	if ( args.length ) {
		opts = options;
	}
	if ( !( this instanceof Stream ) ) {
		return new Stream( opts );
	}
	err = validate( opts );
	if ( err ) {
		throw err;
	}
	Transform.call( this, opts );
	this._readableState.objectMode = true;
	this._data = '';

	return this;
}
583055
function transformChunk(chunk, encoding, done) {
    if (chunk.isNull()) return done();
    if (chunk.isStream()) return this.emit('error', new PluginError(logFlag, 'Streaming not supported'));
    if (
      !(chunk.isMarkdown = options.regexpMarkdown.test(chunk.relative)) &&
      !(chunk.isTemplate = options.regexpTemplate.test(chunk.relative)) &&
      !(chunk.isHtml = options.regexpHtml.test(chunk.relative))
    ) {
      return options.passThrough ? done(null, chunk) : done();
    }
    transformChunkData(chunk);
    if (chunk.data.draft && process.env.NODE_ENV !== 'development') return done();
    if (buffer.hasOwnProperty(chunk.relative)) {
      logDuplicate(chunk);
      return done();
    }
    transformChunkContents.call(this, chunk);
    buffer[chunk.relative] = chunk;
    done(null, chunk);
  }
394817
function transform(chunk, encoding, cb) {
    // only transform for raw bytes
    if (raw) {
      var response = BSON.deserialize(chunk);
      response.cursor.firstBatch.forEach(function(doc) {
        this.push(BSON.serialize(doc));
      }.bind(this));
      return cb();
    }
    // otherwise go back to the main stream
    return cb(null, chunk);
  }
915759
function RawDecoder(schema, opts) {
  opts = opts || {};

  var noDecode = !!opts.noDecode;
  stream.Duplex.call(this, {
    readableObjectMode: !noDecode,
    allowHalfOpen: false
  });

  this._type = types.createType(files.load(schema));
  this._tap = new Tap(new Buffer(0));
  this._writeCb = null;
  this._needPush = false;
  this._readValue = createReader(noDecode, this._type);
  this._finished = false;

  this.on('finish', function () {
    this._finished = true;
    this._read();
  });
}
1091270
function(source, dest) {
        if ((source && dest)) {
            OpenLayers.Projection.transform(
                this, source, dest); 
            this.bounds = null;
        }       
        return this;
    }