
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Run a command in your terminal. Tiny exec() with promises and trim() for Node.js:
import cmd from 'atocha';
(async () => {
// Any basic command will work
console.log(await cmd('ls'));
// Using a better Promise interface, see the lib `swear`
console.log(await cmd('ls').split('\n'));
// Can pipe commands as normal
console.log(await cmd('sort record.txt | uniq'));
})();
Terminal Atocha; Madrid's train station.
exec()
.trim()
so you don't have to do it manually.stderr
will reject the promise with an error instance. Can be caught as normal with .catch()
or try {} catch (error) {}
.Install it in your project:
npm install atocha
Import it to be able to use it in your code:
const cmd = require('atocha'); // Old school
import cmd from 'atocha'; // New wave
Parsing this package's information:
const out = await cmd(`npm info atocha --json`);
const info = JSON.parse(out);
console.log(info.name + '@' + info.version);
// atocha@1.1.1
FAQs
Tiny exec() with Promises and trim()
The npm package atocha receives a total of 22,844 weekly downloads. As such, atocha popularity was classified as popular.
We found that atocha 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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.