Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 7b10232

Browse files
JakubZychcaitp
authored andcommitted
style(filters) use consistent quote style and strict equality
before change quotes where mixed and one if contained equality operator instead of identity Closes #9349
1 parent c7a9009 commit 7b10232

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/ng/filter/filter.js

+11-11
Original file line numberDiff line numberDiff line change
@@ -154,17 +154,17 @@ function filterFilter() {
154154
}
155155

156156
var search = function(obj, text){
157-
if (typeof text == 'string' && text.charAt(0) === '!') {
157+
if (typeof text === 'string' && text.charAt(0) === '!') {
158158
return !search(obj, text.substr(1));
159159
}
160160
switch (typeof obj) {
161-
case "boolean":
162-
case "number":
163-
case "string":
161+
case 'boolean':
162+
case 'number':
163+
case 'string':
164164
return comparator(obj, text);
165-
case "object":
165+
case 'object':
166166
switch (typeof text) {
167-
case "object":
167+
case 'object':
168168
return comparator(obj, text);
169169
default:
170170
for ( var objKey in obj) {
@@ -175,7 +175,7 @@ function filterFilter() {
175175
break;
176176
}
177177
return false;
178-
case "array":
178+
case 'array':
179179
for ( var i = 0; i < obj.length; i++) {
180180
if (search(obj[i], text)) {
181181
return true;
@@ -187,13 +187,13 @@ function filterFilter() {
187187
}
188188
};
189189
switch (typeof expression) {
190-
case "boolean":
191-
case "number":
192-
case "string":
190+
case 'boolean':
191+
case 'number':
192+
case 'string':
193193
// Set up expression object and fall through
194194
expression = {$:expression};
195195
// jshint -W086
196-
case "object":
196+
case 'object':
197197
// jshint +W086
198198
for (var key in expression) {
199199
(function(path) {

0 commit comments

Comments
 (0)