Add Lo-Dash + loader
This commit is contained in:
parent
6bffc20020
commit
34ed6cea02
|
@ -0,0 +1,21 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
// loader for Lo-Dash.
|
||||||
|
//
|
||||||
|
// will load the compatability version on JS implementations with less support
|
||||||
|
// for ES5 features (Tessel, etc)
|
||||||
|
|
||||||
|
var isTessel = function() {
|
||||||
|
try {
|
||||||
|
require("tessel");
|
||||||
|
return true;
|
||||||
|
} catch (e) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
if (isTessel()) {
|
||||||
|
module.exports = require("lodash/dist/lodash.compat");
|
||||||
|
} else {
|
||||||
|
module.exports = require("lodash");
|
||||||
|
}
|
|
@ -46,6 +46,7 @@
|
||||||
"async": "0.9.0",
|
"async": "0.9.0",
|
||||||
"express": "4.10.5",
|
"express": "4.10.5",
|
||||||
"body-parser": "1.10.0",
|
"body-parser": "1.10.0",
|
||||||
"robeaux": "0.3.0"
|
"robeaux": "0.3.0",
|
||||||
|
"lodash": "2.4.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue