How to use the Document function from yaml

Find comprehensive JavaScript yaml.Document code examples handpicked from public code repositorys.

23
24
25
26
27
28
29
30
31
32
  // Send the GET request to the API endpoint and wait for the response
  const res = await k8sApi.readNamespacedDeployment(
    config.DEPLOYMENT_NAME,
    config.DEPLOYMENT_NAMESPACE
  );
  let doc = new YAML.Document();
  doc.contents = res.body;
  return doc;
} catch (error) {
  console.error(error);
fork icon0
star icon0
watch icon1

+ 16 other calls in file