Skip to content

Instantly share code, notes, and snippets.

@yannbertrand
Created January 14, 2017 20:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yannbertrand/c2f6f246df2c35e45a2bba7237688da3 to your computer and use it in GitHub Desktop.
Save yannbertrand/c2f6f246df2c35e45a2bba7237688da3 to your computer and use it in GitHub Desktop.
electron-config default usage not working
const Config = require('electron-config');
const config = new Config();
config.set('unicorn', '🦄');
console.log(config.get('unicorn'));
//=> '🦄'
// use dot-notation to access nested properties
config.set('foo.bar', true);
console.log(config.get('foo'));
//=> {bar: true}
config.delete('unicorn');
console.log(config.get('unicorn'));
//=> undefined
{
"name": "electron-config-test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"electron": "^1.4.14",
"electron-config": "^0.2.1"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment