Guest User

Untitled

a guest
Jul 23rd, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. carsten@lnx-dsk:~/Code/workspaces/netbeans/pyinfx/node$ rlwrap /usr/local/bin/node-repl
  2. Welcome to the Node.js REPL.
  3. Enter ECMAScript at the prompt.
  4. Tip 1: Use 'rlwrap node-repl' for a better interface
  5. Tip 2: Type Control-D to exit.
  6. Type '.help' for options.
  7. node> require.paths.push('.')
  8. 3
  9. node> var file=require('fileIO_cps')
  10. {
  11. "either": [Function],
  12. "readFile": [Function],
  13. "writeFile": [Function],
  14. "appendFile": [Function],
  15. "copyFile": [Function],
  16. "streamFile": [Function],
  17. "streamFileBy": [Function],
  18. "streamLines": [Function],
  19. "writeStream": [Function]
  20. }
  21. node> var s=file.streamLines('/tmp/lines.txt', 'utf-8');
  22. [Function]
  23. node> s(function(msg,param){sys.puts('\n'+msg);sys.puts(param)})
  24. node>
  25. error
  26. null
  27.  
  28. node> s('next')
  29. TypeError: Bad argument
  30. at fileIO_cps.js:70:6
  31. at readAndEmit (fileIO_cps.js:149:34)
  32. at fileIO_cps.js:144:47
  33. at emitOrKeepReading (fileIO_cps.js:180:17)
  34. at Object.<anonymous> (fileIO_cps.js:174:19)
  35. at EventEmitter.<anonymous> (eval at readline (/usr/local/lib/node/libraries/repl.js:48:9))
  36. at EventEmitter.readline (/usr/local/lib/node/libraries/repl.js:48:19)
  37. at node.js:990:9
  38. node>
Add Comment
Please, Sign In to add comment