Node REPL使用underscore变量保存上一次操作的结果,因此它与Underscore库对同一变量的使用相冲突。尝试这样的事情:
Admin-MacBook-Pro:test admin$ node> _und = require("./underscore-min"){ [Function] _: [Circular], VERSION: '1.1.4', forEach: [Function], each: [Function], map: [Function], inject: [Function], (...more functions...) templateSettings: { evaluate: /<%([sS]+?)%>/g, interpolate: /<%=([sS]+?)%>/g }, template: [Function] }> _und.max([1,2,3])3> _und.max([4,5,6])6


