
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Functional Reactive Programming for Ruby.
Add this line to your application's Gemfile:
gem 'frappuccino'
And then execute:
$ bundle
Or install it yourself as:
$ git clone https://github.com/steveklabnik/frappuccino
$ cd frappuccino
$ bundle
$ rake install
Basically, this:
require 'frappuccino'
class Button
def push
emit(:pushed) # emit sends a value into the stream
end
end
button = Button.new
stream = Frappuccino::Stream.new(button)
counter = stream
.map {|event| event == :pushed ? 1 : 0 } # convert events to ints
.inject(0) {|sum, n| sum + n } # add them up
counter.now # => 0
button.push
button.push
button.push
counter.now # => 3
button.push
counter.now # => 4
You can also map via a hash, if you prefer:
.map(:pushed => 1, :default => 0)
You can also register callbacks to a Stream. These will executed for each event that occurs in the Stream:
stream.on_value do |event|
puts "I got a #{event}!"
end
You can combine two streams together:
merged_stream = stream_one.merge(stream_two)
# or
merged_stream = Frappuccino::Stream.merge(one_stream , other_stream)
# or
merged_stream = Frappuccino::Stream.new(button_one, button_two)
You can select events from a stream, too:
stream = Frappuccino::Stream.new(button, something_else)
filtered_stream = stream.select{|event| event == :pushed }
filtered_stream.on_value do |event|
# event will only ever be :pushed
end
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that frappuccino 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
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.