123456789101112131415161718192021222324252627282930 |
- 'use strict';
- /**
- *
- *
- * @author Mai
- * @date
- * @version
- */
- module.exports = {
- checkFieldsExist(source, check) {
- for (const s of source) {
- if (check.indexOf(s) >= 0) {
- return true;
- }
- }
- return false;
- },
- checkFieldsExistReg(source, regStr) {
- const reg = new RegExp(regStr, 'igm');
- for (const s of source) {
- if (reg.test(s)) {
- return true;
- }
- }
- return false;
- }
- };
|