clue

0.1.2 • Public • Published

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

Package Sidebar

Install

npm i clue

Weekly Downloads

5

Version

0.1.2

License

MIT

Last publish

Collaborators

  • arkeologen