read-metadata
Load a JSON or YAML metadata file as an object
Last updated 12 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 (12 years ago)

2 Versions

  • 1.0.0                                ...           12 years ago
  • 0.0.2                                ...           12 years ago
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 1
Dependencies (1)
Dev Dependencies (2)
Dependents (3)

Copyright 2013 - present © cnpmjs.org | Home |