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

dmg-utils

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dmg-utils

Util lib for DMG files.

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

dmg-utils [WIP]

Util lib for DMG files.

npm David

By now it only works on macOS.

Install

npm install dmg-utils

API

command

export declare const command: <
  T extends string,
  K extends `hdiutil mount -nobrowse "${T}"` | `hdiutil unmount "${T}"`
>(mount: boolean) => (path: T) => K
import { command } from 'dmg-utils'

command(true)('./App.dmg')
//=> 'hdiutil mount -nobrowse "./App.dmg"'

command(false)('/Volumes/App')
//=> 'hdiutil unmount "/Volumes/App"'

mount

export declare const mount: <T = string>(
  dmgPath: string,
  callback?: ((volumePath: string) => T) | undefined
) => Promise<string | T>

Returns mounted volume path if no callback function provided.

unmount

export declare const unmount: (
  volumePath: string,
  callback?: Function | undefined
) => Promise<void>

extract

export declare const extract: (
  dmgPath: string,
  destPath: string
) => Promise<void>

Uses copy from fs-extra.

License

MIT License © 2020 Exuanbo

Keywords

FAQs

Package last updated on 28 Oct 2020

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