Skip to content

Commit dfea42f

Browse files
author
craig
committed
2.0.0 / 2022-03-11
================== * Migrate to ESM module standard - @craigparra * Browser native support for IIFE and EMS bundles - @craigparra * Replace lodash dependency with JavaScript native alternatives - @craigparra * GitHub workflow - @craigparra
1 parent 04fb4a1 commit dfea42f

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

.nycrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"lines": 90,
55
"statements": 90,
66
"functions": 90,
7-
"branches": 80,
7+
"branches": 85,
88
"reporter": [
99
"html",
1010
"text",

ConfigFactory-browser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import PlaceHolderResolver from './PlaceHolderResolver.js';
55
import PlaceHolderSelector from './PlaceHolderSelector.js';
66
import PrefixSelector from './PrefixSelector.js';
77
import URLResolver from './URLResolver.js';
8-
import WindowLocationConfig from "./WindowLocationConfig.js";
8+
import WindowLocationConfig from './WindowLocationConfig.js';
99

1010
export default class ConfigFactory {
1111
static getGlobalRef() {

WindowLocationConfig.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,16 @@ import DelegatingConfig from './DelegatingConfig.js';
33
// import ValueResolvingConfig from './ValueResolvingConfig.js';
44

55
export default class WindowLocationConfig extends DelegatingConfig {
6-
7-
constructor(config, path) {
8-
super(config, path);
9-
}
10-
116
// eslint-disable-next-line class-methods-use-this
127
has(path) {
13-
const location = `${window.location.origin}${window.location.pathname}`.replaceAll('.','+');
8+
const location = `${window.location.origin}${window.location.pathname}`.replaceAll('.', '+');
149

1510
return this.config.has(`${location}.${path}`)
1611
|| this.config.has(path);
1712
}
1813

1914
get(path, defaultValue) {
20-
const location = `${window.location.origin}${window.location.pathname}`.replaceAll('.','+');
15+
const location = `${window.location.origin}${window.location.pathname}`.replaceAll('.', '+');
2116
if ((typeof defaultValue !== 'undefined') && this.has(path) === false) {
2217
return defaultValue;
2318
}

0 commit comments

Comments
 (0)