Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
A DateTime wrapper with improved date format parsing and fewer surprises.
Developed by the New York Public Library to transform freetext date metadata into machine-readable data.
Add this line to your application's Gemfile:
gem 'timetwister'
And then execute:
$ bundle
Or install it yourself as:
$ gem install timetwister
Takes a date (or list of dates) as a string, and returns a list of hashes with parsed date data.
Returns a list of hashes of parsed date data.
require 'timetwister'
Timetwister.parse("Jun 1898 - [July 4 1900]")
=> [{:original_string=>"Jun 1898 - July 4 1900", :index_dates=>[1898, 1899, 1900], :date_start=>"1898-06-01", :date_end=>"1900-07-04", :date_start_full=>"1898-06-01", :date_end_full=>"1900-07-04", :inclusive_range=>true, :certainty=>"inferred", :test_data=>"330"}]
Returns a JSON object of parsed date data.
$ timetwister 'december 21 2015'
[{"original_string":"december 21 2015","index_dates":[2015],"date_start":"2015-12-21","date_end":"2015-12-21","date_start_full":"2015-12-21","date_end_full":"2015-12-21","inclusive_range":null,"certainty":null,"test_data":"200"}]
Output explanation:
:original_string
is the original input:index_dates
is an Array
of each year encompassed by the provided date range:date_start
and :date_end
are ISO8601 representations of the input date, with no assumed values:date_start_full
and :date_end_full
are ISO8601 representations of the input date in YYYY-MM-DD format (using assumed values when needed):inclusive_range
is whether or not the input value is a range:certainty
is the certainty of the provided date, based on use of flags and punctuationgit checkout -b my-new-feature
)rspec
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that timetwister 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.