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

builder-util-runtime

Package Overview
Dependencies
Maintainers
2
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

builder-util-runtime

HTTP utilities. Used by [electron-builder](https://github.com/electron-userland/electron-builder).

  • 9.2.10
  • next
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
529K
decreased by-2.54%
Maintainers
2
Weekly downloads
 
Created

What is builder-util-runtime?

The builder-util-runtime npm package provides a set of utility functions and classes that are commonly used in the context of building and packaging applications. It includes functionalities for handling HTTP requests, managing file systems, and other utilities that simplify the development process.

What are builder-util-runtime's main functionalities?

HTTP Requests

This feature allows you to make HTTP requests easily. The code sample demonstrates how to use the `httpExecutor` to make a GET request to a specified URL and log the response data.

const { httpExecutor } = require('builder-util-runtime');

async function fetchData(url) {
  try {
    const response = await httpExecutor.request({
      url: url,
      method: 'GET'
    });
    console.log('Data:', response.data);
  } catch (error) {
    console.error('Error fetching data:', error);
  }
}

fetchData('https://api.example.com/data');

File System Utilities

This feature provides utilities for file system operations. The code sample shows how to use the `copyFile` function to copy a file from a source path to a destination path.

const { copyFile } = require('builder-util-runtime');

async function copyExampleFile() {
  try {
    await copyFile('source.txt', 'destination.txt');
    console.log('File copied successfully');
  } catch (error) {
    console.error('Error copying file:', error);
  }
}

copyExampleFile();

UUID Generation

This feature allows you to generate UUIDs. The code sample demonstrates how to generate a version 4 UUID using the `UUID` class.

const { UUID } = require('builder-util-runtime');

function generateUUID() {
  const uuid = UUID.v4();
  console.log('Generated UUID:', uuid);
}

generateUUID();

Other packages similar to builder-util-runtime

FAQs

Package last updated on 02 Oct 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