1.0.6 • Published 3 years ago
ref-resolver v1.0.6
JSON $ref resolver utility.
This is a small utility function that allows you to send in a JSON file and resolve all the $ref references I've seen quite a few libraries that do this and they have a lot of dependencies and seemed unnecessarily complex (just my opinion)
How to get started
- Install the package
npm i ref-resolver
and require it
const resolver = require("ref-resolver")
- Initialize the resolver with your JSON object
resolver.init(<your JSON goes here>)
- Call the resolve method
(async ()=>{
const { result } = await resolver.resolve()
})()
Contributing
Please feel free to raise issues and PRs to this repository with improvements and suggestions.