Website/node_modules/read-metadata
2015-12-04 02:31:39 -05:00
..
test Paper rendering works, and news fields get populated correctly now. 2015-12-04 02:31:39 -05:00
.npmignore Paper rendering works, and news fields get populated correctly now. 2015-12-04 02:31:39 -05:00
circle.yml Paper rendering works, and news fields get populated correctly now. 2015-12-04 02:31:39 -05:00
index.js Paper rendering works, and news fields get populated correctly now. 2015-12-04 02:31:39 -05:00
Makefile Paper rendering works, and news fields get populated correctly now. 2015-12-04 02:31:39 -05:00
package.json Paper rendering works, and news fields get populated correctly now. 2015-12-04 02:31:39 -05:00
README.md Paper rendering works, and news fields get populated correctly now. 2015-12-04 02:31:39 -05:00

Build Status

read-metadata

Load a JSON or YAML metadata file and return it as an object.

Install

npm install read-metadata

Usage

It handles both JSON and YAML and will return a parsed object.

var read = require('read-metadata');

read('path/to/metadata.json', function(err, data){
    console.log(data);
});

API

read(path, callback)

Takes a path to the metadata file. The callback will be called with fn(err, result).

read.sync(path)

Load a metafile syncronously.