Perform the provided transform on the data
@param   {Object} data  Data to transform
@param   {Object} trans Transform definition
@returns {Object} The transformed data
335267
function (data, transform) {
			if (typeof transform.jsontl !== "undefined") {
				if (typeof transform.jsontl.transform !== "undefined") {
					return locators.in(data, transform.jsontl.transform);
				}
			}
			throw new Error("Tranform definition invalid");
		}
543360
@SuppressWarnings({ "unchecked", "rawtypes" })
	@Override
	protected void doTransform(ITransformable transformable, float comp)
	{
		if (listTransformations.size() == 0)
			return;

		for (Transformation transformation : listTransformations)
			transformation.transform(transformable, elapsedTimeCurrentLoop);
	}
356234
function transformRaw(input, options) {
  const transformStream = new TransformStream(options);
  pipe(input, transformStream.writable);
  return transformStream.readable;
}
447577
@CheckResult
    @NonNull
    public final <O> Data<O> transform(@NonNull Function<? super T, ? extends O> function) {
        return new TransformData<>(this, function);
    }
1253602
function ( data ) {
	    	if ( !data ) return data;
	    	if ( typeof data !== 'object' ) return data;
	    	if ( 'entrySet' in data && typeof data.entrySet === 'function' ) {
	    		//var allowed_long_keys = ['utc_timestamp', 'duration', 'type', 'token'];
	    		var set = data.entrySet();
	    		if ( !set ) return data;
	    		var obj = {};
	    		var iter = set.iterator();
	    		while ( iter.hasNext() ) {
					var entry = iter.next();
					var val = entry.getValue();
					if ( val && typeof val === 'object' && 
						 'entrySet' in val && 
						 typeof val.entrySet === 'function' ) val = convertData(val);
					var key = entry.getKey();
					if ( !key ) {
						throw( "Field key is not valid: " + key );
					}
					obj[entry.getKey()] = val;
				}
				return obj;
	    	} else {
	    		if ( 'utc_timestamp' in data ) data.utc_timestamp = jsDateToTs(data.utc_timestamp);
	    		if ( 'created_at' in data )    data.created_at 	  = jsDateToTs(data.created_at);
	    	}
	    	return data;
	    }
1198165
function JSONTransform(options) {
  // allow use without new
  if (!(this instanceof JSONTransform)) {
    return new JSONTransform(options);
  }

  this.isFirst = true;

  if (options.objectMode !== true) {
    // assume that if they're not giving us objects, this will be an array of strings
    this.isArray = true;
  } else {
    // otherwise they either tell us, or we're assuming they want the smallest form of this data, which is an object.
    this.isArray = options.isArray || false;
  }

  this.options = options;
  this.keyProperty = options.keyProperty || 'key';
  this.valueProperty = options.valueProperty || 'value';

  // init Transform
  Transform.call(this, options);
}
122047
def _transform(self, data, transform, step_size):
    '''
    
    '''
    if transform=='mean':
      total = sum( k*v for k,v in data.items() )
      count = sum( data.values() )
      data = float(total)/float(count) if count>0 else 0
    elif transform=='count':
      data = sum(data.values())
    elif transform=='min':
      data = min(data.keys() or [0])
    elif transform=='max':
      data = max(data.keys() or [0])
    elif transform=='sum':
      data = sum( k*v for k,v in data.items() )
    elif transform=='rate':
      data = { k:v/float(step_size) for k,v in data.items() }
    elif callable(transform):
      data = transform(data, step_size)
    return data
1102803
@Override
    @Deprecated
    public void performTransformations(XDOM dom, Syntax syntax) throws TransformationException
    {
        performTransformations(dom, new TransformationContext(dom, syntax));
    }
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;
}
261159
function runTransforms(transforms, upgradeFile, ref, data, locals) {
  log('debug', `Running ${transforms.length} transforms`);
  return bluebird.reduce(transforms, function (acc, val) {
    var key = val.toString();

    // Parsefloat strips decimals with `.0` leaving just the int,
    // let's add them back in
    if (!_.includes(key, '.')) {
      key += '.0';
    }

    return bluebird.try(upgradeFile[key].bind(null, ref, acc, locals))
      .catch(e => {
        log('error', `Error upgrading ${ref} to version ${key}: ${e.message}`, {
          errStack: e.stack,
          cmptData: JSON.stringify(acc)
        });
        return bluebird.reject(e);
      });
  }, data)
    .then(function (resp) {
      // Assign the version number automatically
      resp._version = transforms[transforms.length - 1];
      return resp;
    });
}
1194116
public function reverseTransform($data)
    {
        if (is_array($data)) {
            return array_map(function ($value) {
                return (string) $value;
            }, $data);
        }

        return (string) $data;
    }
89186
function applyTransforms(transforms, t, callback) {
  log.debug('applying', transforms.length, 'transforms');
  for (var i = 0; i < transforms.length; i++) {
    var transform = transforms[i];
    log.debug('next transform', transform);
    if (transform.isAsync) {
      // asynchronous case
      return transform(t, function(t) {
        // this is only called when the async transform was successful,
        // otherwise t.callback has already been called with an error.
        applyTransforms(transforms.slice(i + 1), t, callback);
      });
    } else {
      // synchronous case
      var result = transform(t);
      if (!result) {
        log.debug('transform has failed or was a final transform');
        // stop processing t.callback has already been called
        return;
      }
    }
  }
  log.debug('all transformations done, starting next step');
  if (nextTickAvailable) {
    return process.nextTick(function() {
      callback(t);
    });
  }
  return callback(t);
}
500071
function transformObject (type) {
  const transformed = {}

  for (let key in type) {
    transformed[key] = transformType(type[key])
  }

  return transformed
}
1093598
public function transform($data)
    {
        if (is_null($data)) {
            return false;
        }

        if (! is_string($data)) {
            throw new DataTransformerException('A string value is expected.');
        }

        if (empty($data)) {
            return false;
        }

        if (in_array($data, ['off', 'no'], true)) {
            return false;
        }

        return true;
    }
172985
function(data) {
    var values = [],
        i      = 0;
    for (i = 0; i < data.length; i++) {
      values.push(this.normalise(data[i]));
    }
    return values;
  }
42299
function clone (data) {
  if (Array.isArray(data)) {
    return data.map(clone)
  } else if (data && typeof data === 'object') {
    let obj = Object.assign({}, data)
    for (let key in obj) {
      if (!obj.hasOwnProperty(key)) continue
      if (typeof obj[key] === 'object') {
        obj[key] = clone(obj[key])
      }
    }
    return obj
  } else {
    return data
  }
}
563252
public function transform($data)
    {
        $output = $data;
        if (is_array($data)) {
            $output = "<ul>";
            foreach ($data as $item) {
                $output .= "<li>" . $this->transform($item) . "</li>";
            }
            $output .= "</ul>";
        }

        return $output;
    }