1. read-metadata
Load a JSON or YAML metadata file as an object
read-metadata
Package: read-metadata
Last modified: Wed, 12 Jul 2023 19:13:19 GMT
Version: 1.0.0
License: MIT
Downloads: 80,899

Install

npm install read-metadata
yarn add read-metadata

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.

Dependencies

RELATED POST

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin