New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

user-settings

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

user-settings

Simple user settings management

  • 0.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
325
increased by2.85%
Maintainers
1
Weekly downloads
 
Created
Source

user-settings

user-settings is a simple way to manage user settings for your command-line Node application. Settings are stored as a file in the user's home directory and all methods are synchronous for simplicity.

Usage

You specify the filename to store and retrieve

// If ~/.myAppSettings doesn't exist, it's created
var settings = require('user-settings').file('.myAppSettings');

// Storing user settings
settings.set('username', 'rev087');

// Retrieving user settings
var username = settings.get('username');

// Unsetting
settings.unset('username');

Home directory location

The home directory used for Unix systems is process.env.HOME and process.env.USERPROFILE for Windows.

Keywords

FAQs

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

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