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

35 lines (31 loc) 937 B
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); /** * @private * @description Gets the analyticsOptions from options- should include sdkSemver, techVersion, sdkCode, and feature * @param {ITrackedPropertiesThroughAnalytics} options * @returns {IAnalyticsOptions} */ function getAnalyticsOptions(options) { var analyticsOptions = { sdkSemver: options.sdkSemver, techVersion: options.techVersion, sdkCode: options.sdkCode, product: options.product, feature: '0', }; if (options.accessibility) { analyticsOptions.feature = 'D'; } if (options.lazyload) { analyticsOptions.feature = 'C'; } if (options.responsive) { analyticsOptions.feature = 'A'; } if (options.placeholder) { analyticsOptions.feature = 'B'; } return analyticsOptions; } exports.getAnalyticsOptions = getAnalyticsOptions;