Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Commit

Permalink
Renamed Control.ts to Utils.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
HamletDRC committed Oct 10, 2015
1 parent 11a6e2e commit 2b3dd1c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/Control.ts → src/Utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Control flow functions.
*/
/* tslint:disable:no-increment-decrement */
module Control {
module Utils {

/**
* Logical 'any' or 'exists' function.
Expand All @@ -22,4 +22,4 @@ module Control {
}
/* tslint:enable:no-increment-decrement */

export = Control;
export = Utils;
4 changes: 2 additions & 2 deletions src/exportNameRule.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

import ErrorTolerantWalker = require('./ErrorTolerantWalker');
import Control = require('./Control');
import Utils = require('./Utils');

/**
* Implementation of the export-name rule.
Expand Down Expand Up @@ -50,7 +50,7 @@ class ExportNameWalker extends ErrorTolerantWalker {
private isSuppressed(exportedName: string) : boolean {
var allExceptions : string[] = Rule.getExceptions(this.getOptions());

return Control.exists(allExceptions, (exception: string) : boolean => {
return Utils.exists(allExceptions, (exception: string) : boolean => {
return new RegExp(exception).test(exportedName);
});
}
Expand Down
8 changes: 4 additions & 4 deletions src/jqueryDeferredMustCompleteRule.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import ErrorTolerantWalker = require('./ErrorTolerantWalker');
import AstUtils = require('./AstUtils');
import Control = require('./Control');
import Utils = require('./Utils');

/**
* Implementation of the jquery-deferred-must-complete rule.
Expand Down Expand Up @@ -132,7 +132,7 @@ class DeferredCompletionWalker extends ErrorTolerantWalker {
}
}

let referenceEscaped : boolean = Control.exists(node.arguments, (argument: ts.Expression) : boolean => {
let referenceEscaped : boolean = Utils.exists(node.arguments, (argument: ts.Expression) : boolean => {
return AstUtils.isSameIdentifer(this.deferredIdentifier, argument);
});
if (referenceEscaped) {
Expand All @@ -144,7 +144,7 @@ class DeferredCompletionWalker extends ErrorTolerantWalker {


protected visitArrowFunction(node: ts.FunctionLikeDeclaration): void {
var isDeferredShadowed : boolean = Control.exists(node.parameters, (param : ts.ParameterDeclaration) : boolean => {
var isDeferredShadowed : boolean = Utils.exists(node.parameters, (param : ts.ParameterDeclaration) : boolean => {
return AstUtils.isSameIdentifer(this.deferredIdentifier, param.name);
});
if (isDeferredShadowed) {
Expand All @@ -156,7 +156,7 @@ class DeferredCompletionWalker extends ErrorTolerantWalker {
}

protected visitFunctionExpression(node: ts.FunctionExpression): void {
var isDeferredShadowed : boolean = Control.exists(node.parameters, (param : ts.ParameterDeclaration) : boolean => {
var isDeferredShadowed : boolean = Utils.exists(node.parameters, (param : ts.ParameterDeclaration) : boolean => {
return AstUtils.isSameIdentifer(this.deferredIdentifier, param.name);
});
if (isDeferredShadowed) {
Expand Down
4 changes: 2 additions & 2 deletions src/noHttpStringRule.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import ErrorTolerantWalker = require('./ErrorTolerantWalker');
import Control = require('./Control');
import Utils = require('./Utils');

/**
* Implementation of the no-http-string rule.
Expand Down Expand Up @@ -31,7 +31,7 @@ class NoHttpStringWalker extends ErrorTolerantWalker {

private isSuppressed(stringText: string) : boolean {
var allExceptions : string[] = NoHttpStringWalker.getExceptions(this.getOptions());
return Control.exists(allExceptions, (exception: string) : boolean => {
return Utils.exists(allExceptions, (exception: string) : boolean => {
return new RegExp(exception).test(stringText);
});
}
Expand Down

0 comments on commit 2b3dd1c

Please sign in to comment.