How to use the cloudinary-core.Transformation function in cloudinary-core

To help you get started, we’ve selected a few cloudinary-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cloudinary / cloudinary-video-player / src / plugins / cloudinary / common.js View on Github external
const mergeTransformation = (transformation1, transformation2) => {
  if (transformation1.constructor.name === 'Transformation' && transformation1.toOptions) {
    transformation1 = transformation1.toOptions();
  }

  const newTransformation = new cloudinary.Transformation(transformation1);

  return newTransformation.fromOptions(transformation2);
};