Rinser/plugins/filter_reject.js

15 lines
1.3 KiB
JavaScript
Raw Normal View History

2016-08-17 14:36:28 +00:00
module.exports = function (item, itemOptions, source) {
2018-08-09 19:51:43 +00:00
const patt = /(Data Analyst|WebLogic|WebSphere|Data Scientist|Change Manager|T24|Test Analyst|Insight Analyst|application tester|senior tester|Salesforce|QlikView|Navision|Murex|seo|django|drupal|SHAREPOINT|per annum|ServiceNow|Test Lead|User Researcher|Service Management|\(PERM\)|£\d.K|Remedy|ITSM|Symfony|Zend|Full Time|Technical Business Analyst|BUSINESS ANALYST|AUTOMATION TESTER|FIELD TECHNICIAN|websphere administrator|Research Data Scientist)/ig;
2016-08-18 08:52:46 +00:00
2018-08-09 16:28:34 +00:00
const engineers = /(Support|Devops|Planning|security|Postgresql|network|sccm|test|data|imac|firewall|vmware)+(?:\s)(?=Engineer)/ig;
2018-08-09 19:51:43 +00:00
const developers = /(Java|PHP|Graduate|Access|Oracle ADF|SHAREPOINT|Ruby on Rails|Java Software|IOS|Qlikview|c#|c\+\+|\.net|bi|go lang)+(?:\s)(?=Developer)/ig;
2018-08-09 16:41:48 +00:00
const architects = /(Java|PHP|Microsoft)+(?:\s)(?=Architect)/ig;
2016-08-18 08:52:46 +00:00
2018-08-09 15:30:42 +00:00
const result = patt.test(itemOptions.description) || engineers.test(itemOptions.description) || developers.test(itemOptions.description) || architects.test(itemOptions.description);
const resultB = patt.test(itemOptions.title) || engineers.test(itemOptions.title) || developers.test(itemOptions.title) || architects.test(itemOptions.title);
2016-08-17 14:36:28 +00:00
2018-08-09 15:43:49 +00:00
console.log('Reject:', (result || resultB === true) ? 'Reject' : 'Pass');
2018-08-09 15:30:42 +00:00
return (result || resultB === true) ? -1 : itemOptions;
2016-08-17 14:36:28 +00:00
};