@@ -34,8 +34,8 @@ core.filters = {
3434} ;
3535
3636function 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 ; } ) ;
3939}
4040
4141function isLevel ( x , q ) { return x . level [ 0 ] . toLowerCase ( ) === q . toLowerCase ( ) ; }
@@ -65,11 +65,11 @@ core.filterProblems = function(opts, cb) {
6565 ( opts . query || '' ) . split ( '' ) . forEach ( function ( q ) {
6666 var f = QUERY_HANDLERS [ q ] ;
6767 if ( ! f ) return ;
68- problems = _ . filter ( problems , function ( x ) { return f ( x , q ) ; } ) ;
68+ problems = problems . filter ( function ( x ) { return f ( x , q ) ; } ) ;
6969 } ) ;
7070
7171 ( opts . tag || [ ] ) . forEach ( function ( t ) {
72- problems = _ . filter ( problems , function ( x ) {
72+ problems = problems . filter ( function ( x ) {
7373 return x . category === t ||
7474 hasTag ( x . companies , t ) ||
7575 hasTag ( x . tags , t ) ;
@@ -88,7 +88,7 @@ core.getProblem = function(keyword, cb) {
8888 if ( e ) return cb ( e ) ;
8989
9090 keyword = Number ( keyword ) || keyword ;
91- var problem = _ . find ( problems , function ( x ) {
91+ var problem = problems . find ( function ( x ) {
9292 return x . id === keyword || x . name === keyword || x . slug === keyword ;
9393 } ) ;
9494 if ( ! problem ) return cb ( 'Problem not found!' ) ;
0 commit comments