-
Notifications
You must be signed in to change notification settings - Fork 0
/
filter.js
40 lines (39 loc) · 979 Bytes
/
filter.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
var filter = {
year: function(lnk, yearCode) {
if (lnk.substr(6, 2) == yearCode.substr(2, 2)) {
return true
} else {
return false
}
},
session: function(lnk, sessionID) {
if (lnk.substr(5, 1) == "s" || lnk.substr(5, 1) == "w") {
if (lnk.substr(5, 1) == sessionID) {
return true
} else {
return false
}
} else {
return false
}
},
ptype: function(lnk, ptype) {
if (lnk.substr(9, 2) == "qp" || lnk.substr(9, 2) == "ms") {
if (lnk.substr(9, 2) == ptype) {
return true
} else {
return false
}
} else {
return false
}
},
paper: function(lnk, paper) {
if (lnk.substr(12, 1) == paper) {
return true
} else {
return false
}
}
}
module.exports = filter