Skip to content

Instantly share code, notes, and snippets.

@nathanwdavis
Created March 26, 2015 18:55
Show Gist options
  • Save nathanwdavis/a1625a12530939530082 to your computer and use it in GitHub Desktop.
Save nathanwdavis/a1625a12530939530082 to your computer and use it in GitHub Desktop.
Strange behavior from lodash in Node REPL
> _ = require('lodash');
{ [Function: lodash]
support: { funcDecomp: true, funcNames: true },
templateSettings:
{ escape: /<%-([\s\S]+?)%>/g,
evaluate: /<%([\s\S]+?)%>/g,
interpolate: /<%=([\s\S]+?)%>/g,
variable: '',
imports: { _: [Circular] } },
after: [Function: after],
assign: [Function],
at: [Function: at],
bind: [Function: bind],
bindAll: [Function: bindAll],
bindKey: [Function: bindKey],
chain: [Function: chain],
...
> var range = _.range(0,10);
undefined
> _
undefined
> range
[ 0,
1,
2,
3,
4,
5,
6,
7,
8,
9 ]
> _
[ 0,
1,
2,
3,
4,
5,
6,
7,
8,
9 ]
>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment