How to use the readFile function from jsonfile
Find comprehensive JavaScript jsonfile.readFile code examples handpicked from public code repositorys.
18 19 20 21 22 23 24 25 26 27 28
* @param {string} packageName * @returns {Promise<string | undefined>} */ async function getPackageVersion(packageName) { let file = packageJson(packageName, "packages"); let json = await jsonfile.readFile(file); return json.version; } /**
0
0
1
+ 2 other calls in file
jsonfile.writeFileSync is the most popular function in jsonfile (13 examples)