[core] Change require() example not to use `default`
[core] Use `hasOwnProperty` instead of `in`...

...to check if a module has exports.