Skip to content

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

Notifications You must be signed in to change notification settings

segment-boneyard/read-metadata

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Resources

Stars

Watchers

Forks

Packages

No packages published