Replies: 3 comments 5 replies
-
import { Document } from 'yaml'
const doc = new Document({ defaultMode: 0644 })
doc.get('defaultMode', true).format = 'OCT'
String(doc) defaultMode: 0o644 That's using the default YAML 1.2 |
Beta Was this translation helpful? Give feedback.
4 replies
-
follow-up question: I still want to pass some schemaOptions to the "stringification" - how do I do that with the doc.toString() method? |
Beta Was this translation helpful? Give feedback.
1 reply
-
Thanks for helping with this @eemeli - all working now! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there,
I have a js object with a number that i'm trying to serialize as an octal (0-prefixed) string - i've added a reviver function:
unfortunately the value comes out surrounded by quotes:
setting
blockQuote
to false didn't help - any suggestions on how I could get the above serialized as simplythanks in advance!
/Ole
Beta Was this translation helpful? Give feedback.
All reactions