commit 9996b4c5143f3b097747f43e6334e57b2d2ffcf6
Author: Tom Hughes <tom@compton.nu>
Date: Wed Oct 19 15:53:30 2016 +0100
Patch to work with lodash 3.x
diff --git a/lib/i18n-transform.js b/lib/i18n-transform.js
index ee6886c..3ada7ca 100644
--- a/lib/i18n-transform.js
+++ b/lib/i18n-transform.js
@@ -1,5 +1,7 @@
var _ = require("lodash");
+_.isNil = function (value) { return value == null };
+
var _getLanguageFromI18n = function (i18nObj) {
if (i18nObj.Language) {
return {
@@ -182,7 +184,7 @@ var _getLanguageFromI18n = function (i18nObj) {
var translations = _extractLanguage(i18nArray, primaryLanguage, true);
if (fields) {
var localization = {};
- _.concat(fields.required, fields.optional)
+ _(fields.required).concat(fields.optional).value()
.forEach(function (field) {
localization[field] = primaryLanguage.ietf;
});
@@ -267,4 +269,4 @@ module.exports.transformByFieldDestination = function (source, destinationToAddL
module.exports.transformDestination = function (source, destinationToAddLanguageTo, acceptLanguages, callback) {
return _transformDestination(source, destinationToAddLanguageTo, acceptLanguages, null, callback);
-};
\ No newline at end of file
+};
diff --git a/package.json b/package.json
index 5b8e69d..209a930 100644
--- a/package.json
+++ b/package.json
@@ -31,6 +31,6 @@
"should": "^10.0.0"
},
"dependencies": {
- "lodash": "^4.13.1"
+ "lodash": "^3.10.1"
}
}