Transform a given module
@param flapjack
@param options
@returns {Q}
172143
function transform(flapjack, options) {
    options = options || {};

    var filePath = options.filePath;
    var config = options.config || {};
    var appName = this.getAppName(filePath, options.appName);
    var appInfo = this.pancakes.cook(options.moduleName, { flapjack: flapjack });
    var routes = appInfo.routes || [];
    var resolveHandlers = this.getResolveHandlers(appName, routes, options);
    var me = this;

    routes = routes.filter(function (route) {
        if (!route.name) {
            return false;
        }

        var uiPart = me.getUIPart(appName, route);
        return !uiPart.serverOnly;
    });

    return this.template({
        appName:            appName,
        sideview:           '',
        moduleName:         this.getAppModuleName(options.prefix, appName),
        auth:               (config && config.security && config.security.auth) || {},
        routes:             JSON.stringify(routes),
        resolveHandlers:    resolveHandlers,
        isMobile:           appInfo.isMobile ? 'true' : 'false'
    });
}
721206
function getAliases(name, flapjack) {
    var moduleInfo = getModuleInfo(flapjack) || {};
    var aliases = moduleInfo[name] || {};
    return aliases === true ? {} : aliases;
}
1187043
function transformArray(array, keys, i, options) {
    if (options) {
      var t = {__index__: i};
      t[options.value] = array[i];

      if (options.key) {
        t[options.key] = i;
      }

      return t;
    } else {
      return array[i];
    }
  }
1107317
def transform_hash(original, options={}, &block)
      options[:safe_descent] ||= {}
      new_hash = {}
      options[:safe_descent][original.object_id] = new_hash
      original.inject(new_hash) { |result, (key,value)|
        if (options[:deep] && Hash === value)
          value = options[:safe_descent].fetch( value.object_id ) {
            transform_hash(value, options, &block)
          }
        end
        block.call(result,key,value)
        result
      }
    end
1297888
function transformBranch (action, ...args) {
  return Array.isArray(action) ?
    transformAsyncBranch.apply(null, [action, ...args]) :
    transformSyncBranch.apply(null, [action, ...args]);
}
1303608
function babel(options = {}) {
    return {
        name: 'babel',

        renderChunk(code) {
            options.presets = [['env', { modules: false }]];
            options.sourceMaps = true;
            return transform(code, options);
        }
    };
}
676517
def transform_response(response, options = {})
      # Now unpack the response into the data types.
      inner = response.delete("response")
      objects = unpack inner, options
      # Unpack pagination as a special case.
      if response.has_key?("pagination")
        paginated_response objects, response
      else
        objects
      end
    end
356234
function transformRaw(input, options) {
  const transformStream = new TransformStream(options);
  pipe(input, transformStream.writable);
  return transformStream.readable;
}
741027
function transformFile(from, to, modulesDirectory) {
  var contents = fs.readFileSync(from, 'utf8');

  // modules
  var modules = getModules(contents);
  for (var index in modules) {
    var module = modules[index];
    if (modulesManifest.hasOwnProperty(module)) {
      continue;
    }
    var modulePath = path_util.modulePath(module, node_modules);
    if (modulePath === null) {
      continue;
    }
    var targetPath = path_util.targetPath(modulePath, node_modules, modulesDirectory);
    modulesManifest[module] = path.relative(process.cwd(), targetPath);
    if (!fs.existsSync(targetPath)) {
      transformFile(modulePath, targetPath, modulesDirectory);
    }
    var relativePath = path_util.relativePath(to, targetPath);
    var re = eval('\/require\\\(\[\'\"\]' + module + '\[\'\"\]\\\)\/ig');
    contents = contents.replace(re, 'require(\'' + relativePath + '\')');
  }

  // requires
  var requires = getRequires(contents);
  for (var index in requires) {
    var require = requires[index];
    var requirePath = path_util.requirePath(from, require);
    if (requirePath === null) {
      continue;
    }
    if (requiresManifest.hasOwnProperty(requirePath)) {
      continue;
    } else {
      requiresManifest[requirePath] = true;
    }
    var targetPath = path_util.targetPath(requirePath, node_modules, modulesDirectory);
    if (!fs.existsSync(targetPath)) {
      transformFile(requirePath, targetPath, modulesDirectory);
    }
  }

  var dirname = path.dirname(to);
  fs.mkdirsSync(dirname);
  fs.writeFileSync(to, contents, 'utf8');
}
1179551
function getServerAliases(flapjack, options) {
    options = options || {};
    var aliases = getAliases('server', flapjack);
    var serverAliases = options && options.serverAliases;
    return _.extend({}, aliases, serverAliases);
}
538174
def transform(options)
      options.map do |key, value|
        [key, ({
          real_time: ->(x) { "-#{x}" },
        }[key] || proc { |x| x }).call(value)]
      end.to_h
    end
711611
function createOptions( options ) {
    var object = optionsCache[ options ] = {};
    _each( options.split( /\s+/ ), function( flag ) {
      object[ flag ] = true;
    });
    return object;
  }
573284
static function transform($modelOrCollection, $options = [])
    {
        $static = new static($options);

        if ($modelOrCollection instanceof Collection) {
            return $modelOrCollection->map([$static, 'transformModel'])->toArray();
        }

        return $static->transformModel($modelOrCollection);
    }
383336
function jsonTransform(options) {
  return function(key, value) {
    var ret = value;
    if (options.stripNulls && (value === null || value === undefined)) {
      // prune nulls
      ret = undefined;
    } else if (options.stripSerializerType && key === 'serializerType') {
      // prune serializerType
      ret = undefined;
    }
    return ret;
  };
}
645792
function ZTransform(options) {
	if(options) {
		if(options.objectMode) {
			options.readableObjectMode = true;
			options.writableObjectMode = true;
		}
		if(options.readableObjectMode && options.writableObjectMode) {
			options.objectMode = true;
		}
		if(typeof options.transform === 'function') {
			this._transform = options.transform;
		}
		if(typeof options.flush === 'function') {
			this._flush = options.flush;
		}
	}
	Transform.call(this, options);
	// note: exclamation marks are used to convert to booleans
	if(options && !options.objectMode && (!options.readableObjectMode) !== (!options.writableObjectMode)) {
		this._writableState.objectMode = !!options.writableObjectMode;
		this._readableState.objectMode = !!options.readableObjectMode;
	}
	if(options && options.readableObjectMode) {
		this._readableState.highWaterMark = 16;
	}
	if(options && options.writableObjectMode) {
		this._writableState.highWaterMark = 16;
	}
	streamMixins.call(this, Transform.prototype, options);
	readableMixins.call(this, options);
	writableMixins.call(this, options);
}
97241
function transformOptions(options) {
  // create namespace object if namespace is passed in as string
  if (typeof options.ns === 'string') options.ns = [options.ns];
  if (typeof options.fallbackLng === 'string') options.fallbackLng = [options.fallbackLng];
  if (typeof options.fallbackNS === 'string') options.fallbackNS = [options.fallbackNS];

  // extend whitelist with cimode
  if (options.whitelist && options.whitelist.indexOf('cimode') < 0) {
    options.whitelist = options.whitelist.concat(['cimode']);
  }

  return options;
}
83394
function evalOptions(options) {
      var animate = typeof options.animate === 'function' ? options.animate.call() : options.animate;
      var fisheye = typeof options.fisheye === 'function' ? options.fisheye.call() : options.fisheye;
      
      options.animate = animate;
      options.fisheye = fisheye;
    }