Using the Underscore module with Node.js

后端 未结 5 1528
悲&欢浪女
悲&欢浪女 2020-11-28 02:17

I\'ve been learning about node.js and modules, and can\'t seem to get the Underscore library to work properly... it seems that the first time I use a function from Underscor

5条回答
  •  天涯浪人
    2020-11-28 03:11

    As of today (April 30, 2012) you can use Underscore as usual on your Node.js code. Previous comments are right pointing that REPL interface (Node's command line mode) uses the "_" to hold the last result BUT on you are free to use it on your code files and it will work without a problem by doing the standard:

    var _ = require('underscore');
    

    Happy coding!

提交回复
热议问题