Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- carsten@lnx-dsk:~/Code/workspaces/netbeans/pyinfx/node$ rlwrap /usr/local/bin/node-repl
- Welcome to the Node.js REPL.
- Enter ECMAScript at the prompt.
- Tip 1: Use 'rlwrap node-repl' for a better interface
- Tip 2: Type Control-D to exit.
- Type '.help' for options.
- node> require.paths.push('.')
- 3
- node> var file=require('fileIO_cps')
- {
- "either": [Function],
- "readFile": [Function],
- "writeFile": [Function],
- "appendFile": [Function],
- "copyFile": [Function],
- "streamFile": [Function],
- "streamFileBy": [Function],
- "streamLines": [Function],
- "writeStream": [Function]
- }
- node> var s=file.streamLines('/tmp/lines.txt', 'utf-8');
- [Function]
- node> s(function(msg,param){sys.puts('\n'+msg);sys.puts(param)})
- node>
- error
- null
- node> s('next')
- TypeError: Bad argument
- at fileIO_cps.js:70:6
- at readAndEmit (fileIO_cps.js:149:34)
- at fileIO_cps.js:144:47
- at emitOrKeepReading (fileIO_cps.js:180:17)
- at Object.<anonymous> (fileIO_cps.js:174:19)
- at EventEmitter.<anonymous> (eval at readline (/usr/local/lib/node/libraries/repl.js:48:9))
- at EventEmitter.readline (/usr/local/lib/node/libraries/repl.js:48:19)
- at node.js:990:9
- node>
Add Comment
Please, Sign In to add comment