
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
unparse-args
Advanced tools
Unparse parsed arguments back to the original argv array or a command string.
A Node module to help you unparse parsed arguments back to the original argv array or a command string.
This module will:
Imagine a hypothetical command string with flags, subcommands, options... etc:
node example.js another --number 297261 -t something -x 'something longer than just 1 word' -a -e
Popular argument parsing modules for Node: yargs, subarg, and minimist all parse these into an object like:
var args = {
_: [ 'node', '/Users/arjun/example/example.js', 'another' ],
number: 297261,
t: 'something',
x: 'something longer than just 1 word',
a: true,
e: true
};
But we might want to manipulate it and flatten it out again to be like:
['node', '/Users/arjun/example/example.js', 'another', '--number', '297261', '-t', 'something', '-x', 'something longer than just 1 word', '-a', '-e']
npm install --save unparse-args
var unparse = require('unparse-args');
Assume some parsed arguments.
var parsed = subarg(process.argv);
// OR
var parsed = minimist(process.argv);
// OR
var parsed = yargs.parse(process.argv);
Easily unparse them into an array.
var unparsed = unparse(parsed)
console.log(unparsed); // ['node', 'example.js', 'another', '--number', '297261', '-t', 'something', '-x', 'something longer than just 1 word', '-a', '-e']
var command_string = unparsed.command_string;
console.log(command_string); // node example.js another --number 297261 -t something -x 'something longer than just 1 word' -a -e
I know I know, unparsed is an array, so how can it have a property?? Magic.
The MIT License (MIT) Copyright (c) 2014 Arjun Mehta
FAQs
Unparse parsed arguments back to the original argv array or a command string.
The npm package unparse-args receives a total of 0 weekly downloads. As such, unparse-args popularity was classified as not popular.
We found that unparse-args 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 researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.