Socket
Book a DemoInstallSign in
Socket

vol

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vol

Get and set sound volume

latest
Source
npmnpm
Version
3.0.0
Version published
Maintainers
2
Created
Source

vol

Get and set sound volume

Install

$ npm install vol

Usage

const vol = require('vol');

vol.get().then(level => {
	console.log(level);
	//=> 0.45
});

vol.set(0.65).then(() => {
	console.log('Changed volume to 65%');
});

API

.get()

Returns Promise with the current volume level.

.set(level)

Set volume level.

level

Type: number

A number between 0 and 1.

  • vol-cli - CLI for this module

License

MIT © Andreas Gillström

Keywords

app

FAQs

Package last updated on 19 Sep 2017

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