
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.
car-conductor
Advanced tools
Middleware for adding web workers to your choo app, with the help of workerify transforms.
Helped me search a client-side database on each keypress while not dropping any input field frames.
-- 🤓 Author
The conductor constructor takes a file path and sets up a named scope variable based on the filename, or an as an optional second parameter. It creates a webworker, sets up a '*'
binding that conditionally triggers on set event [scope]:
and passes the event on to the worker thread.
Anything the worker thread sends will get set under the local state[scope]
npm i car-conductor workerify
Add workerify like so -t workerify
or so "browserify": { "transform": [ "workerify" ] }
in your package.json
var conductor = require('car-conductor')
var app = require('choo')()
app.use(conductor('./passengers.js'))
app.route('/' function mainView(state, emit) {
return html`
<div class="cars">
Passenger count ${state.passengers.count}
<a onclick=${emit('passengers:increment')}>Add passenger</a>
</div>
`
})
app.mount('body')
A possible passengers.js
file can look like this:
// Yes, worker will be browserified tnx 💪-ify
var dream = require("intensive-task")
var state = {
count: 0
}
// To hydrate state
self.postMessage(state)
self.onmessage = function(msg){
var eventName = msg.data[0]
var data = msg.data[1]
switch(eventName){
case 'increment': {
state.count += data || 1
self.postMessage(state)
self.postMessage(['render'])
break
}
case 'nothing to do': {
state.subconscious = dream(state.subconscious)
}
default: {
self.postMessage(state)
self.postMessage(['render'])
}
}
}
Cons: Cars isolate the state.
FAQs
choo web-worker middleware
The npm package car-conductor receives a total of 0 weekly downloads. As such, car-conductor popularity was classified as not popular.
We found that car-conductor 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.