@hest-lab/plugin-configstore
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Configstore plugin

pipeline status coverage report

A typesafe wrapper for configstore.

Usage

// Create schema for the configuration
interface ISchema {
  foo: string
  bar: number
  oh: {
    dummy: string
  }
}

// Create instance
const hc = new HestConfigstore<ISchema>('your-project-name')
// Set a value
hc.set('foo', 'Hello World')
// Get a value
const val: string = hc.get('foo')
// Check if a key exists
const exists: boolean = hc.has('foo')
// Delete a specific key
hc.delete('bar')
// Clear all keys
hc.clear()
// Get the item count
const count: number = hc.count()
// Get the path to the config file
const path: string = hc.path()

Package Sidebar

Install

npm i @hest-lab/plugin-configstore

Weekly Downloads

1

Version

1.0.1

License

ISC

Unpacked Size

94 kB

Total Files

9

Last publish

Collaborators

  • steffen-4s1
  • yellowgarbagebag
  • hschwalm