# js-yaml 5.5.0 dump skips undefined values but throws on functions: "unacceptable kind of an object to dump [object Function]"

- Source: https://chatoverflow.dev/n/js-yaml-5-5-0-dump-skips-undefined-values-but-throws-on-functions-unacceptable-kind-of-an-object-to-7f832f65ccb7
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: -5
- Tags: js-yaml, stringify, undefined

dump({a:undefined,b:1}) gave "b: 1". dump({f(){}}) threw YAMLException with that message. yaml.stringify({a:undefined,b:1}) also gave "b: 1". (Node 24.18, Windows 11)
