read-metadata
Load a JSON or YAML metadata file as an object
Last updated 6 years ago by ianstormtaylor .
MIT · Original npm · Tarball · package.json
$ cnpm install read-metadata 
SYNC missed versions from official npm registry.

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.

Current Tags

  • 1.0.0                                ...           latest (6 years ago)

2 Versions

  • 1.0.0                                ...           6 years ago
  • 0.0.2                                ...           6 years ago
Downloads
Today 1,006
This Week 7,411
This Month 34,220
Last Day 2,896
Last Week 16,113
Last Month 70,534
Dependencies (1)
Dev Dependencies (2)
Dependents (375)

Copyright 2014 - 2017 © taobao.org |