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;
}


/**
fork icon0
star icon0
watch icon1

+ 2 other calls in file