
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Utility class for ranges of times (time periods). It's like Range, but has additional enumeration capabilities. See examples for the tasty stuff.
period = TimeRange.new(1.year.ago, Time.now)
Enumerate by days
period.each(:day) { |time| puts time }
Enumerate by weeks
period.each(:week) { |time| puts time }
(also years, months, hours, minutes and seconds)
Enumerate by custom period
period.each(42.seconds) { |time| puts time }
+each+ Returns Enumerator object, so this is also possible (extra yummy):
period.each(:month).map { |time| time.strftime('%B') }
Supports all Enumerable interface: find, select, reject, inject, etc.
0.3.0: Public repository along with the very first RubyGems gem
0.2.0: The Granulate class has been converted to a class method that returns a hash. Granulate was not easy to use because it returned an instance of 'Granulate'. This prevented clients from iterating through the result.
0.1.0: breaks compatibility with previous versions because it adds hours to the Granulate class. This means that in previous versions Granulate.rest contained time ranges that cannot be separated into days when granulating, but now it just contains ranges that cannot be separated into hours.
FAQs
Unknown package
We found that 3scale_time_range demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers 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.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.