Skip to content

Instantly share code, notes, and snippets.

@bkw
Created July 17, 2012 21:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bkw/3132425 to your computer and use it in GitHub Desktop.
Save bkw/3132425 to your computer and use it in GitHub Desktop.
difference in behaviour between lodash.js and lodash.min.js
#!/usr/bin/env node
var _ = require('./lodash.js')._,
_min = require('./lodash.min.js')._,
t = '{{ demo.join(",") }}',
data = { demo: ['a', 'b'] };
_.templateSettings = _min.templateSettings = {
interpolate : /\{\{(.+?)\}\}/g
};
console.log( _.template(t)(data) );
console.log( _min.template(t)(data) );
@bkw
Copy link
Author

bkw commented Jul 17, 2012

$ node test.js
a,b
<e%= demo.join(",") %>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment