{"_id":"read-metadata","_rev":"370636","name":"read-metadata","description":"Load a JSON or YAML metadata file as an object","dist-tags":{"latest":"1.0.0"},"maintainers":[{"name":"segment-admin","email":"tools+npm@segment.com"},{"name":"segmentio","email":"friends@segment.io"}],"time":{"modified":"2021-07-27T02:34:20.000Z","created":"2014-07-30T17:56:24.056Z","1.0.0":"2014-08-12T22:58:27.247Z","0.0.2":"2014-07-30T17:56:24.056Z"},"users":{},"author":{"name":"Anthony Short"},"versions":{"1.0.0":{"name":"read-metadata","version":"1.0.0","description":"Load a JSON or YAML metadata file as an object","main":"index.js","scripts":{"test":"make test"},"author":{"name":"Anthony Short"},"license":"MIT","dependencies":{"yaml-js":"0.0.8"},"devDependencies":{"should":"~2.1.1","mocha":"~1.17.0"},"gitHead":"722f71b28009634e9007d8f6243e4603df4759ff","_id":"read-metadata@1.0.0","_shasum":"6df9cbe51184e8ceb7d0668b40ee5191e6f3dac6","_from":".","_npmVersion":"1.4.20","_npmUser":{"name":"ianstormtaylor","email":"ian@ianstormtaylor.com"},"maintainers":[{"name":"segment-admin","email":"tools+npm@segment.com"},{"name":"segmentio","email":"friends@segment.io"}],"dist":{"shasum":"6df9cbe51184e8ceb7d0668b40ee5191e6f3dac6","size":1673,"noattachment":false,"key":"/read-metadata/-/read-metadata-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/read-metadata/download/read-metadata-1.0.0.tgz"},"directories":{},"publish_time":1407884307247,"_cnpm_publish_time":1407884307247,"_hasShrinkwrap":false},"0.0.2":{"name":"read-metadata","version":"0.0.2","description":"Load a JSON or YAML metadata file as an object","main":"index.js","scripts":{"test":"make test"},"author":{"name":"Anthony Short"},"license":"MIT","dependencies":{"yaml-js":"0.0.8"},"devDependencies":{"should":"~2.1.1","mocha":"~1.17.0"},"_id":"read-metadata@0.0.2","dist":{"shasum":"4b392da86631ed250de0f6897878601f3819e491","size":1536,"noattachment":false,"key":"/read-metadata/-/read-metadata-0.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/read-metadata/download/read-metadata-0.0.2.tgz"},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"anthonyshort","email":"antshort@gmail.com"},"maintainers":[{"name":"segment-admin","email":"tools+npm@segment.com"},{"name":"segmentio","email":"friends@segment.io"}],"directories":{},"publish_time":1406742984056,"_cnpm_publish_time":1406742984056,"_hasShrinkwrap":false}},"readme":"[![Build Status](https://circleci.com/gh/segmentio/read-metadata.png?circle-token=c2b4cfaa8e98f46f9ee24fba69609eb790e500f2)](https://circleci.com/gh/segmentio/read-metadata)\n\n# read-metadata\n\nLoad a JSON or YAML metadata file and return it as an object.\n\n## Install\n\n```\nnpm install read-metadata\n```\n\n## Usage\n\nIt handles both JSON and YAML and will return a parsed object.\n\n```\nvar read = require('read-metadata');\n\nread('path/to/metadata.json', function(err, data){\n    console.log(data);\n});\n```\n\n## API\n\n### read(path, callback)\n\nTakes a path to the metadata file. The callback will be called with `fn(err, result)`.\n\n### read.sync(path)\n\nLoad a metafile syncronously.","_attachments":{},"license":"MIT"}