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

@electron/asar

Package Overview
Dependencies
Maintainers
0
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@electron/asar

Creating Electron app packages

  • 3.2.17
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
540K
decreased by-1.92%
Maintainers
0
Weekly downloads
 
Created

What is @electron/asar?

@electron/asar is a Node.js library used to create, manipulate, and extract ASAR (Atom Shell Archive) files. ASAR files are essentially archives used by Electron applications to package their resources. This package provides functionalities to pack files into an ASAR archive, extract files from an ASAR archive, and manipulate the contents of an ASAR archive.

What are @electron/asar's main functionalities?

Packing files into an ASAR archive

This feature allows you to pack a directory of files into an ASAR archive. The `createPackage` function takes the source directory and the output file path as arguments and creates the ASAR archive.

const asar = require('@electron/asar');

asar.createPackage('path/to/source', 'path/to/output.asar', function() {
  console.log('ASAR archive created successfully!');
});

Extracting files from an ASAR archive

This feature allows you to extract all files from an ASAR archive to a specified directory. The `extractAll` function takes the ASAR archive path and the destination directory as arguments and extracts the contents.

const asar = require('@electron/asar');

asar.extractAll('path/to/archive.asar', 'path/to/destination', function() {
  console.log('ASAR archive extracted successfully!');
});

Listing files in an ASAR archive

This feature allows you to list all files contained in an ASAR archive. The `listPackage` function takes the ASAR archive path as an argument and returns an array of file paths contained in the archive.

const asar = require('@electron/asar');

const files = asar.listPackage('path/to/archive.asar');
console.log(files);

Other packages similar to @electron/asar

FAQs

Package last updated on 07 Nov 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