Skip to content

Commit

Permalink
refactor: use more descriptive DEFAULT_OPTIONS varname
Browse files Browse the repository at this point in the history
  • Loading branch information
ericdeansanchez committed Dec 3, 2020
1 parent 9d3bb9e commit 6533f68
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions dist/imgix-core-js.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ var DPR_QUALITIES = {
4: 23,
5: 20
};
var DEFAULTS = {
var DEFAULT_OPTIONS = {
domain: null,
useHTTPS: true,
includeLibraryParam: true,
Expand Down Expand Up @@ -105,7 +105,7 @@ var ImgixClient = /*#__PURE__*/function () {

_classCallCheck(this, ImgixClient);

var settings = Object.assign({}, DEFAULTS);
var settings = Object.assign({}, DEFAULT_OPTIONS);
this.settings = Object.assign(settings, opts); // a cache to store memoized srcset width-pairs

this.targetWidthsCache = {};
Expand Down
4 changes: 2 additions & 2 deletions dist/imgix-core-js.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ var DPR_QUALITIES = {
4: 23,
5: 20
};
var DEFAULTS = {
var DEFAULT_OPTIONS = {
domain: null,
useHTTPS: true,
includeLibraryParam: true,
Expand Down Expand Up @@ -101,7 +101,7 @@ var ImgixClient = /*#__PURE__*/function () {

_classCallCheck(this, ImgixClient);

var settings = Object.assign({}, DEFAULTS);
var settings = Object.assign({}, DEFAULT_OPTIONS);
this.settings = Object.assign(settings, opts); // a cache to store memoized srcset width-pairs

this.targetWidthsCache = {};
Expand Down
4 changes: 2 additions & 2 deletions dist/imgix-core-js.umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@
4: 23,
5: 20
};
var DEFAULTS = {
var DEFAULT_OPTIONS = {
domain: null,
useHTTPS: true,
includeLibraryParam: true,
Expand Down Expand Up @@ -646,7 +646,7 @@

_classCallCheck(this, ImgixClient);

var settings = Object.assign({}, DEFAULTS);
var settings = Object.assign({}, DEFAULT_OPTIONS);
this.settings = Object.assign(settings, opts); // a cache to store memoized srcset width-pairs

this.targetWidthsCache = {};
Expand Down
2 changes: 1 addition & 1 deletion src/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const DPR_QUALITIES = {
5: 20
};

export const DEFAULTS = {
export const DEFAULT_OPTIONS = {
domain: null,
useHTTPS: true,
includeLibraryParam: true,
Expand Down
4 changes: 2 additions & 2 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Base64 } from 'js-base64';
import {
VERSION,
DOMAIN_REGEX,
DEFAULTS,
DEFAULT_OPTIONS,
DPR_QUALITIES
} from './constants.js';

Expand All @@ -18,7 +18,7 @@ import {

export default class ImgixClient {
constructor(opts = {}) {
let settings = Object.assign({}, DEFAULTS);
let settings = Object.assign({}, DEFAULT_OPTIONS);
this.settings = Object.assign(settings, opts);
// a cache to store memoized srcset width-pairs
this.targetWidthsCache = {};
Expand Down

0 comments on commit 6533f68

Please sign in to comment.