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

myconf

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

myconf

Easily manage a config file in your project.

  • 0.0.32
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
4.7K
decreased by-13.04%
Maintainers
1
Weekly downloads
 
Created
Source

myconf

NPM version NPM download David Status

Easily manage a config file in your project.

You always want to make it possible for users to save some custom configs with a Node.js command line tool, such like you made a node-version Git tool and wanna save the configs to /Users/$username/.gitconfig. That's why I made this tool to facilitate your development.

Example

import Config from 'myconf'

// This points to a file $USER_HOME/.customconfig
const config = new Config('.customconfig')

// or save the file to a custom path
config.path('/path/to/save/to')

// or change a parser, the default is `json`
// parser in ['json', 'yaml']
config.parser('yaml')

// set a property
config
  .set('name', 'config for my project')
  .then(data => console.log(data.name))

// set multi properties
config
  .set({name: 'egoist', version: '1.4.2'})
  .then(data => console.log(data))

// get a property
config
  .get('name')
  .then(name => console.log(name))

// get all properties
config
  .get()
  .then(data => console.log(data.name))

// override the config file
config
  .save({newName: 'inori', oldName: 'will_gone'})
  .then(data => console.log(data))

License

This project is released under SOX license that means you can do whatever you want to do, but you have to open source your copy on github if you let the public uses it. All copies should be released under the same license. The owner of each copy is only reponsible for his own copy, not for the parents, not for the children.

permitted use:
fork on github
change
do evil with your copy

prohibted use:
do evil with copies not of your own
open source your copy without declaring your parent copy

FAQs

Package last updated on 02 Dec 2015

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