MCPcopy Index your code
hub / github.com/node-schedule/node-schedule / recurMatch

Function recurMatch

lib/Invocation.js:197–217  ·  view source on GitHub ↗
(val, matcher)

Source from the content-addressed store, hash-verified

195};
196
197function recurMatch(val, matcher) {
198 if (matcher == null) {
199 return true;
200 }
201
202 if (typeof matcher === 'number') {
203 return (val === matcher);
204 } else if(typeof matcher === 'string') {
205 return (val === Number(matcher));
206 } else if (matcher instanceof Range) {
207 return matcher.contains(val);
208 } else if (Array.isArray(matcher) || (matcher instanceof Array)) {
209 for (let i = 0; i < matcher.length; i++) {
210 if (recurMatch(val, matcher[i])) {
211 return true;
212 }
213 }
214 }
215
216 return false;
217}
218
219/* Date-based scheduler */
220function runOnDate(date, job) {

Callers 1

Invocation.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…