yam

1.0.0 • Public • Published

yam

Build Status

Dead simple lazy storage interface, useful to store cli or project settings. The file being parsed is expected in valid JSON format that can include comments.

Yam Constructor

var Yam = require('yam');
 
//looks for a .test file in the current directory as well as your home directory
var yam = new Yam('test');
 
//customize where the file is located
var yam = new Yam('test', {
  primary: 'path/to/primary/location',
  secondary: 'path/to/secondary/location'
});

.test file example:

{
  //comments are valid
  'foo': 'bar'
}

Get

yam.get('foo'); // => 'bar'

GetAll

yam.getAll();

Readme

Keywords

Package Sidebar

Install

npm i yam

Weekly Downloads

135,680

Version

1.0.0

License

MIT

Unpacked Size

24.1 kB

Total Files

8

Last publish

Collaborators

  • kellyselden
  • stefanpenner
  • twokul