Documentation
¶
Overview ¶
Package jsyaml writes YAML and JSON exactly as the TypeScript CLI did with js-yaml's dump and JSON.stringify. Users keep the files `get` writes in Git; any difference in formatting would show up as a change to every one of them after upgrading.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Clone ¶
Clone copies a value deeply, so that one copy can be trimmed for a request while the other is written back to its file intact.
func CompactJSON ¶
CompactJSON renders like JSON.stringify(value).
func NumberString ¶
NumberString formats a float64 as JavaScript's Number.prototype.toString does.
Types ¶
type Map ¶
type Map struct {
// contains filtered or unexported fields
}
Map is a JavaScript object: string keys in JavaScript's iteration order.
func (*Map) Keys ¶
Keys in JavaScript's order: keys that are array indices first, ascending, then the rest in insertion order. JSON.parse and js-yaml both see objects this way.