spec-json-schemas
spec-json-schemas copied to clipboard
refactor: included caching in add-new-version.js.
Description
- This file had too many fs read and write operations.
- Included cache which reads data from all files and returns the writes final cache at the end of execution( addNewVersion function).
- ReadJsonFile - Reads File and puts it in cache.
- WriteJsonFile - Required cache file is written back.