note.js: copied in a clean branch

with a new require API