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 Ruby regular expression for matching Unicode Emoji symbols.
This is based upon the fantastic work from Mathias Bynens' emoji-test-regex-pattern
package. emoji-test-regex-pattern
is cleverly assembled based upon data from the Unicode Consortium.
The regular expressions provided herein are derived from that package.
gem install emoji_regex
emoji_regex
provides the EmojiRegex::Regex
regular expression, which matches emoji, as defined by the Unicode standard's emoji-test
data file.
require 'emoji_regex'
text = <<TEXT
\u{231A}: ⌚ default Emoji presentation character (Emoji_Presentation)
\u{2194}\u{FE0F}: ↔️ default text presentation character with Emoji variation selector
\u{1F469}: 👩 Emoji modifier base (Emoji_Modifier_Base)
\u{1F469}\u{1F3FF}: 👩🏿 Emoji modifier base followed by a modifier
TEXT
text.scan EmojiRegex::Regex do |emoji|
puts "Matched sequence #{emoji} — code points: #{emoji.length}"
end
Console output:
Matched sequence ⌚ — code points: 1
Matched sequence ⌚ — code points: 1
Matched sequence ↔️ — code points: 2
Matched sequence ↔️ — code points: 2
Matched sequence 👩 — code points: 1
Matched sequence 👩 — code points: 1
Matched sequence 👩🏿 — code points: 2
Matched sequence 👩🏿 — code points: 2
Note: The above code and output are verified as part of the spec suite.
To install all the Ruby and Javascript dependencies, you can run:
bin/setup
To update the Ruby source files based on the emoji-regex
library:
bundle exec rake regenerate
A spec suite is provided, which can be run as:
bundle exec rake spec
Since Version 14.0.0, Ruby Emoji Regex's versions have followed that of the Unicode standard itself.
Ruby Emoji Regex is based upon the emoji-test-regex-pattern
package.
emoji-test-regex-pattern
is released, and if its changes affect the Ruby port meaningfully, a version will be released with the same or greater patch version.While Ruby Emoji Regex uses features which should function on any Ruby version, it is explicitly intended to work on MRI Ruby versions which are currently within normal maintenance according to the Ruby team.
rake release
FAQs
Unknown package
We found that emoji_regex 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.