Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
contained-periodic-values
Advanced tools
Find how many values of a discrete periodic function are contained in an interval.
Find how many values of a discrete periodic function contained in an interval.
Periodic functions are functions that repeat. Discrete functions are functions whose values do not connect. An example of a discrete periodic function is the function of "Wednesdays" on a calendar. Wednesdays are discrete values along a timeline, and they repeat every 7 days.
Continuing the example from above, this library could be used to determine the number of Wednesdays between two days. You could extend this to find the number of work days or week days between two days.
The members of a periodic function's output are the "values." A single member is a "value."
The distance that the function repeats itself along is the "period."
An interval is defined by a "start" and "end".
containedPeriodicValues(start, end, value, period)
Find the number of values contained with the "start" and "end." This method works with
intervals with inclusive starts and exclusive ends. In math syntax, this would be written
as [start, end)
.
The order that you specify the start and end does not matter.
FAQs
Find how many values of a discrete periodic function are contained in an interval.
The npm package contained-periodic-values receives a total of 46,424 weekly downloads. As such, contained-periodic-values popularity was classified as popular.
We found that contained-periodic-values demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.