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

clue

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clue

JSON based configuration loader and parser.

  • 0.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

clue

JSON based configuration loader and parser.

Install

To install, just run the following command:

$ npm install clue --save

It will be installed in your node_modules/ directory and will added a dependency entry in package.json.

Usage

The module would help to parse your custom JSON file and load the configuration successfully into the buffer. However, you could use alternative methods to get value by dot notation or it will return the default respectively.


;(function() {
  var Clue = require('clue');

  var clue = new Clue('/path/to/json/file');
  var name = clue.get('name');  // Return `name` key from JSON file.
  var name = clue.get('name', 'ArkeologeN'); // If `name` key not found, it will return "ArkeologeN".
  var nested = clue.get('script.test'); // If will get the value of `test` key from the `script` object.
})();

Author

Wrapper has been developed by Hamza Waqas

Keywords

FAQs

Package last updated on 21 Apr 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