Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cto.ai/ops-local-config

Package Overview
Dependencies
Maintainers
10
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cto.ai/ops-local-config

cto.ai library for managing local configuration settings

  • 1.2.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
4
Maintainers
10
Weekly downloads
 
Created
Source

@cto.ai/ops-local-config

cto.ai library for managing local configuration settings

Creates, writes, reads and removes a config.json file from a specified directory.

API

This is a native ESM module.

localConfig(opts) => instance

Options:

  • dir (string) Required - the configuration directory to store a config.json file in
  • name (string) Optional - an alternative name for config.json (without the extension)

instance.read() => Promise => config

Read and parse contents of the config.json file into an object.

instance.write(config) => Promise => config

Serialize and write a configuration object to the config.json file.

instance.clear() => Promise => undefined

Removes the config.json file.

Engines

  • Node 12.4+
  • Node 14.0+

Development

Test:

npm test

Visual coverage report (run after test):

npm run cov

Lint:

npm run lint

Autoformat:

npm run lint -- --fix

Releasing

For mainline releases:

npm version <major|minor|patch>
git push --follow-tags

For prereleases:

npm version prerelease
git push --follow-tags

License

MIT

FAQs

Package last updated on 01 Mar 2021

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