# read-metadata

> Load a JSON or YAML metadata file as an object

Latest version **1.0.0** (published 2014-08-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install read-metadata
pnpm add read-metadata
yarn add read-metadata
bun add read-metadata
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2014-08-12 |
| First published | 2014-07-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Anthony Short |
| Maintainers | anthonyshort, ianstormtaylor, segmentio, segment |

## Links

- npm: https://www.npmjs.com/package/read-metadata
- npm.io page: https://npm.io/package/read-metadata

## Dependencies (1)

- [yaml-js](https://npm.io/package/yaml-js.md) 0.0.8

## Recent versions

- 1.0.0 (latest) — 2014-08-12
- 0.0.2 — 2014-07-30

## README

[![Build Status](https://circleci.com/gh/segmentio/read-metadata.png?circle-token=c2b4cfaa8e98f46f9ee24fba69609eb790e500f2)](https://circleci.com/gh/segmentio/read-metadata)

# 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.

---
_Source: https://npm.io/package/read-metadata · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
