Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Cross-platform Linux commands in pure ES6
Cash is a cross-platform implementation of Unix shell commands written in pure ES6.
Huh? Okay - think Cygwin, except:
> npm install cash -g
> cash
$
Yeah. But it gets better.
Let's mix some Windows & Unix commands together:
$ ipconfig | grep IPv4 | sort
IPv4 Address. . . . . . . . . . . : 10.10.40.50
IPv4 Address. . . . . . . . . . . : 192.168.100.11
$
No problem. Let's make all commands global on your system:
> npm install cash-global -g
> ls -lah
You're covered!
> npm install cash-ls -g
> npm install cash-grep -g
Again, you're in business:
const $ = require('cash');
const out = $.ls('.', {l: true});
Not terse enough? How about this:
const out = $('ls -lah');
Not :sunglasses: enough? Try this:
require('cash') `
cp -R ./src ./dest
ls | grep *-spec.js | cat
rm ./specResults.html
`;
For even better programmatic Unix commands, check out Shell.JS.
It was, before Vorpal.
Made with ❤ by dthree.
Love it? Cash is brand new! Give it a :star: or a tweet to help spread the word!
Cash is a project working on a cross-platform implementation of the most used Unix-based commands in pure JavaScript and with no external dependencies.
The goal of Cash is to open up these commands to the massive JavaScript community for the first time, and to provide a cleaner, simpler and flexible alternative to applications like Cygwin for those wanting the Linux feel on Windows.
Cash was built with strict attention to nearly exact implementations and excellent test coverage of over 200 unit tests.
The following commands are currently implemented:
Want more commands?
I am currently looking for someone with experience in building Windows installers (.msi
) to bundle Cash and its individual components into a self-contained wrapper. If you would like to help with this, send me a ping.
source
, export
, true
and false
commands, among several other contributions.clear
and tail
commands.head
command.In its very essence, Cash replaces the Windows CLI prompt (>
) with the Unix one ($
), the dollar symbol.
Cash was most fitting in this sense:
Ask and ye shall receive
> cash
$
Cash is also a play on the word bash
, and is actually[1] a recursive acronym for Cash Shell.
Shout out to @aseemk for donating the name.
No.
For those who don't know, Shell.JS is an awesome Node package that implements UNIX shell commands programatically in JavaScript. Check it out - really. While Shell.JS was tremendously helpful in figuring out how to accomplish Cash, the two do not really conflict.
Shell.JS gives the feel of UNIX commands in a code environment, but aims to implement the commands in a way that makes sense for a JavaScript library. This means that many commands return JavaScript objects, and some of the rougher and more dangerous edges of bash have been softened a bit.
For example, with cash:
$('ls'); // 'node_modules\n'
$('echo foo > foo.txt');
With Shell.JS:
ls(); // ['node_modules'];
echo('foo').to('foo.txt');
MIT © David Caccavella
FAQs
Cross-platform Linux commands in pure ES6.
The npm package cash receives a total of 3,344 weekly downloads. As such, cash popularity was classified as popular.
We found that cash demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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 uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.