visionmedia/js-yaml — Issue #37: `eval` returns `undefined` if the string starts with a comment
Author: fredreichbier
Created: 2011-11-16 20:30:36+00:00
State: open

(coffeescript)

yaml = require "yaml"

data1 = yaml.eval """
# This is a comment.
Hey: There
"""
data2 = yaml.eval """
Hey: There
"""
console.log data1
console.log data2

gives:

undefined
{ Hey: 'There' }

Not sure if that's expected behaviour. I'll probably have a look into the code for that. ;)