Skip to content

Commit

Permalink
Fix a bunch of typos
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Oct 11, 2016
1 parent f07ad2a commit 1a89aad
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default class Repository extends EventEmitter implements EventEmitter {
private storage: Storage;
private etag: string;

constructor (backupPath: string, url: string, refreshIntervall?: number, StorageImpl = Storage) {
constructor (backupPath: string, url: string, refreshInterval?: number, StorageImpl = Storage) {
super();
if (!url.startsWith('http')) {
throw new Error(`Wrong url: ${url}`);
Expand All @@ -24,8 +24,8 @@ export default class Repository extends EventEmitter implements EventEmitter {

process.nextTick(() => this.fetch());

if (refreshIntervall != null && refreshIntervall > 0) {
this.timer = setInterval(() => this.fetch(), refreshIntervall);
if (refreshInterval != null && refreshInterval > 0) {
this.timer = setInterval(() => this.fetch(), refreshInterval);
this.timer.unref();
}
}
Expand Down Expand Up @@ -61,7 +61,7 @@ export default class Repository extends EventEmitter implements EventEmitter {
}

if (res.statusCode !== 200) {
return this.emit('error', new Error('Reponse was not statusCode 200'));
return this.emit('error', new Error('Response was not statusCode 200'));
}

try {
Expand Down
8 changes: 4 additions & 4 deletions src/unleash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const BACKUP_PATH: string = tmpdir();

export interface UnleashConfig {
url: string;
refreshIntervall?: number;
refreshInterval?: number;
backupPath?: string;
strategies: Strategy[];
errorHandler?: (err: any) => any;
Expand All @@ -23,7 +23,7 @@ export class Unleash extends EventEmitter {

constructor({
url,
refreshIntervall = 15 * 1000,
refreshInterval = 15 * 1000,
backupPath = BACKUP_PATH,
strategies = [],
errorHandler = () => {}
Expand All @@ -34,7 +34,7 @@ export class Unleash extends EventEmitter {
throw new Error('Unleash server URL missing');
}

this.repository = new Repository(backupPath, url, refreshIntervall);
this.repository = new Repository(backupPath, url, refreshInterval);

this.repository.on('error', (err) => {
this.emit('error', err);
Expand All @@ -58,7 +58,7 @@ export class Unleash extends EventEmitter {
return this.client.isEnabled(name, context, fallbackValue);
} else {
const returnValue = typeof fallbackValue === 'boolean' ? fallbackValue : false;
this.emit('warn', `Unleash has not been initalized yet. isEnabled(${name}) defaulted to ${returnValue}`);
this.emit('warn', `Unleash has not been initialized yet. isEnabled(${name}) defaulted to ${returnValue}`);
return returnValue;
}
}
Expand Down

0 comments on commit 1a89aad

Please sign in to comment.