So I was playing around with the Node.js REPL and the Underscore library when I noticed something very strange. If I require("underscore"), the variable _ is set globally (obviously). Then when I attempt to run a simple command like console.l...
I'm very familiar with the Ruby REPL's, irb and pry. In both, if I type something and forget to save it to a variable, I can access the last outputted thing by typing _  For example, in irb,  >> [2,3,4] => [2, 3, 4] >> _ =>...
This is a noob question.  I am trying to use node.js as a JavaScript REPL (read-evaluate-print loop) shell to work with JavaScript interactively. Unfortunately I can define neither variables nor functions.  > var x = 'abc' undefined > f...
I have installed some-npm-module globally, but I get an error when I require() it:  $ node     > const module = require('some-npm-module') > import module from 'some-npm-module'  Error: Cannot find module 'some-npm-module...
I need to write an extension for firefox that accepts data from a socket connection and can send reply messages via the same port. I was wondering if anyone knows of any tutorials or some example code I can look at for accomplishing this as I cannot...
I created a script in Javascript using Node.js to scrape some data from a website overnight.  We'll, I'm at 67% and it's going to take about 5-6 more hours to finish.  But I have enough data at the moment that I'd like to stop it.  Is...
I've tried instantiating a PouchDB instance in node REPL.    In REPL:  var pouchdb = require("pouchdb"); var foo = new pouchdb("foo");   This always causes node to exit with the exception:   undefined:0 TypeError: undefined is not...
I am trying to set up a nodejs dev environment in emacs, but having some trouble navigating the differences between:   node-repl nodejs-repl nodejs-repl-mode and  javascript-mode   ...and how I should combine these to have command line execution, syn...
I wanted to have a convenience "node shell" that loaded some commonly used models so I could interact with them and the database.  Seems node inspect app_shell.js fails to import (require) the script whilst claiming to have done so.  File str...
I want to save the nodejs repl session to file. And from the file I can restore the status of that session, including user defined global variables and functions.  For example, if I type   a=1;b={x:1};b.__proto__={y:2};f=()=>{console.log(1)};   I...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.