
Research
/Security News
11 Malicious Go Packages Distribute Obfuscated Remote Payloads
Socket uncovered 11 malicious Go packages using obfuscated loaders to fetch and execute second-stage payloads via C2 domains.
The most straightforward co-routine library for Node.JS ever.
Provides predictable composable async/await
from C#5.0 style
co-routines for everyday use since you can live in a Harmony.
Inspired by @ForbesLindesay's great presentation: http://pag.forbeslindesay.co.uk/#/
and @visionmedia co
.
As of co-4.0
that was rewritten to use promises, so-1.0
can be compared with co.wrap
and represents its more light and strict version.
When using node 0.11.x or greater, you must use the --harmony-generators
flag or just --harmony
to get access to generators.
When using node 0.10.x and lower or browsers without generator support, you must use gnode and/or regenerator.
Also as of so-1.0
you should ensure existence of Promise either by using --harmony
or any available polyfill.
$ npm install so
var so = require('so');
var fs = require('then-fs');
var readJSON = so(function*(path){
return JSON.parse(yield fs.readFile(path, 'utf8'));
});
var main = so(function*(){
var a = yield readJSON('a.json');
var b = yield readJSON('b.json');
console.log({a:a, b:b});
});
main().catch(function(e){
console.log(e.stack || e.message || e);
});
or for CoffeeScript
so = require 'so'
fs = require 'then-fs'
readJSON = so (path) ->
JSON.parse yield fs.readFile path, 'utf8'
main = so ->
a = yield readJSON 'a.json'
b = yield readJSON 'b.json'
console.log {a, b}
main().catch (e) ->
console.log e.stack ? e.message ? e
FAQs
So, the most straightforward coroutine library for everyday use
We found that so 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
Socket uncovered 11 malicious Go packages using obfuscated loaders to fetch and execute second-stage payloads via C2 domains.
Security News
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).