Right now there is an implicit* validation done after the read (https://github.com/flatiron/prompt/blob/master/lib/prompt.js#L463), but I think it might be helpful to do an explicit validation beforehand.
typeof defaultLine !== 'numeric'
typeof defaultLine !== 'number'
Validate that default value is string or numeric. Ignore otherwise.
wrote numeric instead of number
If default is not string, try casting it
Number gets ignored on the way back anyway, so it's best to string converting it to a string
I made a mess of the commits, so I squashed them.
I also noticed that number values would be ignored after reading by the same code on L463, so I modified the code to try doing a toString() to non-string values (to convert numbers). That way it's string in/string out.
P.S. Read v.1.0.3 won't accept objects or arrays as a default value (https://github.com/isaacs/read/blob/master/lib/read.js#L11)