Skip to content

Commit

Permalink
Style: change variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
JPeer264 committed May 11, 2019
1 parent 14e00c7 commit 099245c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions lib/baseLibrary.js
Expand Up @@ -28,24 +28,24 @@ export class BaseLibrary {
fillLibrary() {
} // /fillLibrary

get(selector, opts = {}) {
get(value, opts = {}) {
const optionsDefault = {
isOriginalValue: true,
};

const options = merge({}, optionsDefault, opts);

let result = this.values[selector] || selector;
let result = this.values[value] || value;

// fail on setted exludes
if (this.isExcluded(selector)) {
return selector;
if (this.isExcluded(value)) {
return value;
}

// change the objects if isOriginalValue are set to false
// to get information about the compressed values
if (!options.isOriginalValue) {
result = this.compressedValues[selector] || result;
result = this.compressedValues[value] || result;
}

return result;
Expand Down Expand Up @@ -75,17 +75,17 @@ export class BaseLibrary {

const randomName = renamedValue || nameGenerator.generate();

// save css selector into this.selectors and this.compressedSelectors
// save variable into this.values and this.compressedValues
this.values[value] = randomName;
this.compressedValues[randomName] = value;
} // /set

setMultiple(selectors, options = {}) {
if (Object.prototype.toString.call(selectors) !== '[object Object]') {
setMultiple(values, options = {}) {
if (Object.prototype.toString.call(values) !== '[object Object]') {
return;
}

entries(selectors).forEach(entry => this.set(entry[0], entry[1], options));
entries(values).forEach(entry => this.set(entry[0], entry[1], options));
} // /setMultiple

setPrefix(prefix) {
Expand Down

0 comments on commit 099245c

Please sign in to comment.