Questions tagged [js-yaml]

4 questions
1
vote
1 answer

Writing dynamically created YAML - Creating the Docker compose file for an ecosystem (using js-yaml)

Question: Has anyone been able to work with the js-yaml library to write a docker compose like this? Context: I am working on dotnet templates and have some pre-defined application architecture patterns for our teams. I would like to take it a step…
Meester Over
  • 161
  • 2
  • 13
0
votes
1 answer

How to check the response from an API as YAML but also check if the response is not JSON or Plain Text using javascript?

Is there any way to validate YAML but not JSON? I specifically wanted to check if the response is in YAML but not in JSON or Plain Text. Is there any way to do this? I do not want to do this checking the content-type I tried using YAML.load()…
anonymous
  • 1
  • 1
0
votes
0 answers

Add Yaml file to download link

I'm using js-yaml to create a yaml file from form fields. As a result, I have a parsed Json data, smth like this: import yaml from 'js-yaml'; const result = yaml.dump({"data":"someData", ...}) Is it possible to extract the result from the app? Smth…
-1
votes
3 answers

How to sort keys when using js-yaml dump()

I'm using the js-yaml package. It has a function named dump() that will write out a JavaScript data structure in YAML format. I want to specify the order of the keys when it dumps out an object. Here is what their docs say: sortKeys (default: false)…
John Deighan
  • 4,329
  • 4
  • 18
  • 19