@@ -34,8 +34,8 @@ core.filters = {
34
34
} ;
35
35
36
36
function hasTag ( o , tag ) {
37
- return _ . isArray ( o ) &&
38
- _ . some ( o , function ( x ) { return x . indexOf ( tag . toLowerCase ( ) ) >= 0 ; } ) ;
37
+ return Array . isArray ( o ) &&
38
+ o . some ( function ( x ) { return x . indexOf ( tag . toLowerCase ( ) ) >= 0 ; } ) ;
39
39
}
40
40
41
41
function isLevel ( x , q ) { return x . level [ 0 ] . toLowerCase ( ) === q . toLowerCase ( ) ; }
@@ -65,11 +65,11 @@ core.filterProblems = function(opts, cb) {
65
65
( opts . query || '' ) . split ( '' ) . forEach ( function ( q ) {
66
66
var f = QUERY_HANDLERS [ q ] ;
67
67
if ( ! f ) return ;
68
- problems = _ . filter ( problems , function ( x ) { return f ( x , q ) ; } ) ;
68
+ problems = problems . filter ( function ( x ) { return f ( x , q ) ; } ) ;
69
69
} ) ;
70
70
71
71
( opts . tag || [ ] ) . forEach ( function ( t ) {
72
- problems = _ . filter ( problems , function ( x ) {
72
+ problems = problems . filter ( function ( x ) {
73
73
return x . category === t ||
74
74
hasTag ( x . companies , t ) ||
75
75
hasTag ( x . tags , t ) ;
@@ -88,7 +88,7 @@ core.getProblem = function(keyword, cb) {
88
88
if ( e ) return cb ( e ) ;
89
89
90
90
keyword = Number ( keyword ) || keyword ;
91
- var problem = _ . find ( problems , function ( x ) {
91
+ var problem = problems . find ( function ( x ) {
92
92
return x . id === keyword || x . name === keyword || x . slug === keyword ;
93
93
} ) ;
94
94
if ( ! problem ) return cb ( 'Problem not found!' ) ;
0 commit comments