8000 Prepare for list by company/tags. · lxpwuqiuyu/leetcode-cli@1e06320 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1e06320

Browse files
committed
Prepare for list by company/tags.
Signed-off-by: Eric Wang <skygragon@gmail.com>
1 parent 2e9141b commit 1e06320

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

lib/commands/list.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,12 @@ cmd.handler = function(argv) {
8686
}
8787

8888
if (argv.tag) {
89+
var tag = argv.tag;
90+
// TODO: fill company/tags in problems
8991
problems = _.filter(problems, function(x) {
90-
return x.category === argv.tag;
92+
return x.category === tag ||
93+
x.company === tag ||
94+
(x.tags && x.tags.indexOf(tag) !== -1);
9195
});
9296
}
9397

test/test_plugin.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
var _ = require('underscore');
21
var assert = require('chai').assert;
32
var rewire = require('rewire');
43

0 commit comments

Comments
 (0)
0