Deployment Strategy (#4) (#6)

This commit is contained in:
Deepak Sattiraju
2019-11-18 21:07:19 +05:30
committed by GitHub
parent 8d56cba217
commit be01c3f321
38 changed files with 4360 additions and 255 deletions
+25
View File
@@ -0,0 +1,25 @@
export enum StringComparer {
Ordinal,
OrdinalIgnoreCase,
}
export function isEqual(str1: string, str2: string, stringComparer: StringComparer): boolean {
if (str1 == null && str2 == null) {
return true;
}
if (str1 == null) {
return false;
}
if (str2 == null) {
return false;
}
if (stringComparer == StringComparer.OrdinalIgnoreCase) {
return str1.toUpperCase() === str2.toUpperCase();
} else {
return str1 === str2;
}
}