code: function umdWrap(factoryCode, facName, amdDeps, cjsDeps) {
          var amdDeps = amdDeps.map(function (dep) {
                  return "'" + dep + "'";
              }),
              cjsDeps = cjsDeps.map(function (dep) {
                  return "require('" + dep + "')";
              });
          return UMD_TEMPLATE.START +
              UMD_TEMPLATE.LOADER_START +
              UMD_TEMPLATE.AMD_START +
              amdDeps.join(',') +
              UMD_TEMPLATE.AMD_MIDDLE +
              facName +
              UMD_TEMPLATE.AMD_END +
              UMD_TEMPLATE.LOADER_MIDDLE +
              UMD_TEMPLATE.CJS_START +
              facName +
              UMD_TEMPLATE.CJS_MIDDLE +
              cjsDeps.join(',') +
              UMD_TEMPLATE.CJS_END +
              UMD_TEMPLATE.LOADER_END +
              factoryCode +
              UMD_TEMPLATE.END;
      }
docs: Wrap a factory with a CJS loader.
  UMD_TEMPLATE = {
  START: "(function(){if (typeof define === 'function' && define.amd) {",
  AMD_START: AMD_TEMPLATE.START,
  <-- amd dependencies -->
  AMD_MIDDLE: AMD_TEMPLATE.MIDDLE,
  <-- factory function -->
  AMD_END: AMD_TEMPLATE.END,
  MIDDLE: "} else if (typeof exports === 'object') {",
  CJS_START: CJS_TEMPLATE.START,
  <-- factory function -->
  CJS_MIDDLE: CJS_TEMPLATE.MIDDLE,
  <-- cjs requires -->
  CJS_END: CJS_TEMPLATE.END,
  END: "} else throw Error('Cannot find a module loader');}());"
  };