MCPcopy
hub / github.com/microsoft/SandDance / skip

Function skip

docs/tests/v2/es6/js/sanddance.js:92173–92175  ·  view source on GitHub ↗
(f, step, phase)

Source from the content-addressed store, hash-verified

92171}
92172
92173function skip(f, step, phase) {
92174 return step <= 1 ? f : phase ? (d, y) => phase + step * Math.floor((f(d, y) - phase) / step) : (d, y) => step * Math.floor(f(d, y) / step);
92175} // returns the day of the year based on week number, day of week,
92176// and the day of the week for the first day of the year
92177
92178

Callers 1

_Function · 0.85

Calls 1

fFunction · 0.70

Tested by

no test coverage detected