UNPKG

@cloudinary/url-gen

Version:

Cloudinary URL-Gen SDK ========================= [![Build Status](https://api.travis-ci.com/cloudinary/js-url-gen.svg?branch=master)](https://app.travis-ci.com/github/cloudinary/js-url-gen) ## About The Cloudinary URL-Gen SDK allows you to quickly and eas

63 lines (59 loc) 1.64 kB
'use strict'; var FlagQualifier = require('./FlagQualifier-0e14a6c3.cjs'); /** * @description Contains functions to select the mode when using a progressive format. * <b>Learn more</b>: {@link https://cloudinary.com/documentation/transformation_reference#fl_progressive|Progressive modes} * @memberOf Qualifiers * @namespace Progressive * @example * import {Cloudinary} from "@cloudinary/url-gen"; * import {format} from "@cloudinary/url-gen/actions/delivery"; * import {jpg} from "@cloudinary/url-gen/qualifiers/format"; * import {steep} from "@cloudinary/url-gen/qualifiers/progressive"; * * const yourCldInstance = new Cloudinary({cloud: {cloudName: 'demo'}}); * const image = yourCldInstance.image('woman'); * image.delivery(format(jpg()).progressive(steep())) */ class ProgressiveQualifier extends FlagQualifier.FlagQualifier { constructor(mode) { super('progressive', mode); } } /** * @memberOf Qualifiers.Progressive */ function none() { return new ProgressiveQualifier('none'); } /** * @memberOf Qualifiers.Progressive */ function semi() { return new ProgressiveQualifier('semi'); } /** * @memberOf Qualifiers.Progressive */ function steep() { return new ProgressiveQualifier('steep'); } /** * @memberOf Qualifiers.Progressive */ function progressive() { return new ProgressiveQualifier(); } const Progressive = { semi, none, steep, progressive, ProgressiveQualifier }; exports.Progressive = Progressive; exports.ProgressiveQualifier = ProgressiveQualifier; exports.none = none; exports.progressive = progressive; exports.semi = semi; exports.steep = steep;