Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on May 19, 2024 via pnpm

configstore 6.0.0

Easily load and save config without having to think about where and how
Package summary
Share
0
issues
4
licenses
8
MIT
3
ISC
1
BSD-2-Clause
1
(MIT OR CC0-1.0)
Package created
13 Nov 2012
Version published
5 Apr 2021
Maintainers
9
Total deps
13
Direct deps
5
License
BSD-2-Clause

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
8 Packages, Including:
crypto-random-string@4.0.0
dot-prop@6.0.1
imurmurhash@0.1.4
is-obj@2.0.0
is-typedarray@1.0.0
typedarray-to-buffer@3.1.5
unique-string@3.0.0
xdg-basedir@5.1.0

ISC License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
Cannot
hold-liable
Must
include-copyright
include-license
3 Packages, Including:
graceful-fs@4.2.11
signal-exit@3.0.7
write-file-atomic@3.0.3

BSD 2-Clause "Simplified" License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
configstore@6.0.0

(MIT OR CC0-1.0)

Public Domain
1 Packages, Including:
type-fest@1.4.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

5
All Dependencies CSV
β“˜ This is a list of configstore 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
dot-prop6.0.13.33 kBMIT
prod
graceful-fs4.2.119.57 kBISC
prod
unique-string3.0.01.5 kBMIT
prod
write-file-atomic3.0.34.68 kBISC
prod
xdg-basedir5.1.02.56 kBMIT
prod

Visualizations

Frequently Asked Questions

What does configstore do?

Configstore is a convenient npm package that allows users to easily load and persist configurations without worrying about where and how they are stored. The configurations are saved in a JSON file located either in $XDG_CONFIG_HOME or ~/.config.

How do you use configstore?

To use Configstore in your project, first, install the package by using the command $ npm install configstore. Then you can import Configstore into your JavaScript file. You can create a new instance of Configstore using packageJson.name as the packageName and set initial default configurations as the defaults parameter. You can use the .set() function to define configuration value or use the .get() function to retrieve the value of a configuration.

import Configstore from 'configstore';

const packageJson = JSON.parse(fs.readFileSync('./package.json', 'utf8'));

// Create a Configstore instance.
const config = new Configstore(packageJson.name, {foo: 'bar'});

console.log(config.get('foo')); // Outputs 'bar'
config.set('awesome', true);
console.log(config.get('awesome')); // Outputs true

// Use dot-notation to access nested properties.
config.set('bar.baz', true);
console.log(config.get('bar')); // Outputs {baz: true}

config.delete('awesome');
console.log(config.get('awesome')); // Outputs undefined

Where are the configstore docs?

The Configstore documentation can be found in the README file of its GitHub repository: https://github.com/yeoman/configstore. It provides information such as API definitions, package installations, usage examples, and available options. This extensive guide will prove quite beneficial for both beginners and experts looking to implement Configstore in their projects.