Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@parcel/utils

Package Overview
Dependencies
Maintainers
0
Versions
889
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@parcel/utils

Blazing fast, zero configuration web application bundler

  • 2.0.0-canary.1661
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.2M
increased by75.22%
Maintainers
0
Weekly downloads
 
Created

What is @parcel/utils?

@parcel/utils is a utility library that provides a collection of helper functions and classes to assist with various tasks in the Parcel bundler ecosystem. These utilities can be used for file system operations, logging, process management, and more.

What are @parcel/utils's main functionalities?

File System Operations

This feature allows you to perform file system operations such as reading and writing files. The code sample demonstrates reading the contents of 'input.txt' and writing it to 'output.txt'.

const { readFile, writeFile } = require('@parcel/utils');

async function readAndWriteFile() {
  const data = await readFile('input.txt', 'utf8');
  await writeFile('output.txt', data);
}

readAndWriteFile();

Logging

This feature provides a logging utility to log messages at different levels (info, warn, error). The code sample demonstrates logging messages at various levels.

const { logger } = require('@parcel/utils');

logger.info('This is an info message');
logger.warn('This is a warning message');
logger.error('This is an error message');

Process Management

This feature allows you to execute shell commands and manage processes. The code sample demonstrates running a shell command and logging its output.

const { exec } = require('@parcel/utils');

async function runCommand() {
  const { stdout, stderr } = await exec('echo Hello, World!');
  console.log('stdout:', stdout);
  console.log('stderr:', stderr);
}

runCommand();

Other packages similar to @parcel/utils

FAQs

Package last updated on 24 Jun 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc